change the text in blog posts (older post and newer post).
Hello everybody
We're looking for a way to change the text in blog posts (older post and newer post). That would be great if you could change that somehow, e.g. in (older project - newer project) is there a script that overrides this? After hours of trying I want to ask you guys :)
so we could use the blog more versatile e.g. for portfolio etc.
-Niko
Best Answer
-
This looks possible, at least while testing using Chrome devtools, but you'll need CSS knowledge and DevTools knowledge to get the right ID for each link. Here is an example from my site. Please note that the value of each ID is unique and this code will do nothing on your site as the ID value is unique to my website. You'll have to replace the number string (i.e.
1170774986
) with your own IDs. That said, I'm only testing w/ dev tools currently as I don't want to publish this on my site, so you'll have to get the right ID, add the JavaScript in a <script> tag to your blog post template page in Developer mode using the blog-head-section.html file and publish it to fully verify. It says the selector is null in editor mode and only appears to work on the live site, which I think is related to the page being dynamically rendered.I recommend reading a Chrome dev tools tutorial if you are going to try to implement this so you get the right ID from the page's HTML.
2
Answers
-
What exactly do you mean by Change The Text? Why would you need a Script to do that?
Your description is a little vague.
0 -
hello AJ_Pfeil
what i mean is this. in the case of a blog post, you have <older post or newer post> at the bottom as link texts. I would like that instead of < older post e.g. < older project - replace the word "post" with "project" . I can't adjust that in duda.
sorry my english is not very good :)
0 -
thank you Elisabeth 😀
yes i think thats the way:)
i think maybe with JavaScript String replace() it will work:)
Thank you very much for your detailed answer! I really appreciate it.I just need to search for some "parent" id and then replace javascript should hopefully work. otherwise I have to do that for every blog post
0 -
Hi @Nikos use the code I provided and replace the ID from my website with your own ID and don't modify the rest of the line (I am a JavaScript developer). Do not use string replace--you need to manipulate the DOM. The function I pasted in 'innerText' will change the text and not mess up the link. String replace is more so for code where you are replacing strings attached to a variable and not manipulating a DOM element.
For clarity, here is a use case for using the String object method
replace()
on a String object assigned to a variable.0 -
If you paste your live blog here I can just give you the parent IDs
0 -
Thanks very much!!
oh I didn't know about the java string :) good to know
I would like to try your instructions.
I just started blogging on a new client site. As soon as I have it, I'll be happy to send you the link!
Many thanks for your support! very nice of you
1 -
Can you please guide me, where can I change this texts? I think it should be a part of core product, because when clients language is another like english, there is no way how to change the text from english and buttons < Older Post Newer Post remains in english.
Did somebody solved this problem?
0
Categories
- 670 All Categories
- 2 Getting Started
- 48 Announcements
- 590 Ask a Question
- 15 Going Live & Publishing
- 84 Website Builder
- 5 App Store
- Custom Branding & Client Management
- 4 Team Collaboration
- 14 eCommerce
- 37 Conversations
- 3 Industry News
- 3 Website Design Feedback
- 2 Random
- 7 Idea Board
- Duda Experts
- 4 Events