Jump to content

Change Next/Previous navigation on Rally blog navigation

Go to solution Solved by markvigeant,

Recommended Posts

  • Solution

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>

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.