Jonnylbbc Posted January 24, 2021 Share Posted January 24, 2021 Site URL: https://www.littleblackboxcollective.com/blog/simon-open-door-2020 Hi, I am looking to change the navigation on our blog posts (Rally template) to change Previous to "Newer post" and Next to "Older Post". I have tried advice from another thread on this forum with some code injection but unfortunately it didn't work. Any help would be appreciated! Thanks Link to comment
Solution markvigeant Posted January 26, 2021 Solution Share Posted January 26, 2021 Hey there- I just solved a similar issue on a blog on the Margot template. Here's the code I used, with the appropriate class names taken from Rally. Toss this into your header and let me know if you need anything else! <script> (function() { window.addEventListener('load', function() { var paginationLabels = document.querySelectorAll('.BlogItem-pagination-link-label'); for (var i = 0; i < paginationLabels.length; i++) { var text = paginationLabels[i].textContent; text = text.replace("Previous", "Newer Post"); text = text.replace("Next", "Older Post"); paginationLabels[i].textContent = text; } }); })(); </script> tuanphan 1 Link to comment
Jonnylbbc Posted January 29, 2021 Author Share Posted January 29, 2021 Hi Mark, that's brilliant, it worked a treat! Thanks very much. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment