Mondq Posted June 5, 2020 Share Posted June 5, 2020 Site URL: https://www.dontpandemic.org/artists I would like to change the text "older posts to more artists" Link to comment
jpeter Posted June 5, 2020 Share Posted June 5, 2020 @Mondq You can add the following JS below. You can update the nextLabelText and prevLabelText values based on your needs. : (function(document){ var nextLabelText = 'Older posts to more artists'; var prevLabelText = 'Newer posts to more artists'; /************************************************************************** * DO NOT EDIT CODE BELOW, unless you know what your doing. ***************************************************************************/ // Initialized code depending on if the user places it in the header or footer if(document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init(){ var prev = document.querySelector('.blog-list-pagination .prev-label'); var next = document.querySelector('.blog-list-pagination .next-label'); if(next){ next.textContent = nextLabelText } if(prev) { prev.textContent = prevLabelText; } } })(document); Make sure this code is between <script> tags, example: <script> // js code goes here </script> Link to comment
Mondq Posted June 5, 2020 Author Share Posted June 5, 2020 Hi JPeter, Thanks for that, I added in the script in the Post Blog Item Code Injection but it didnt seem to work? Have I missed something? Thanks in advance Link to comment
jpeter Posted June 5, 2020 Share Posted June 5, 2020 @Mondq I updated the code a little bit, plus looks like you're adding the code to the post itself, rather than the page that lists the posts. I'd add the code to the Page Header Code Injection settings. Link to comment
Mondq Posted June 5, 2020 Author Share Posted June 5, 2020 Amazing! Thanks so much jpeter! Lifesaver. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.