Archived topic
Blog post navigation - Translating or omitting Next & Previous
5 replies · Started by T on October 21, 2020
Hi,
I'm using WP in Finnish, with GP 3.0.2 Premium 1.12.2.
My blog navigation displays currently page numbers (1 2) with Next -> or <-Previous. As my blog is mostly in Finnish, I'd like to edit this.
Is there any way to either add Finnish translation of Next and Previous next to their English equivalents, or to remove Next and Previous completely and just keep page numbers (with arrows OK)?
Best regards,
Tiina
Hi there,
try this PHP Snippet:
add_filter( 'generate_next_link_text', function() {
return 'Next';
} );
add_filter( 'generate_previous_link_text', function() {
return 'Previous';
} );
Simply change the Next and Previous to the text you want or you can add just a symbol
How to add PHP:
https://docs.generatepress.com/article/adding-php/
Hi David,
Thanks for the PHP Snippet. I picked Insert PHP Code Snippet plugin to put it into my WP site, and while I was able to create a snippet short code, I'm still trying to figure out how and where to copy it so that it will show at the end of a blog page (not blog post.) This is really not my forte. Need to do some studying and forum searching :)
Best regards,
Tiina
Hi there,
Simply pasting the code that David provided into a new "Code Snippet" and activating it should do the trick. Is it not working?
Let us know :)
Hi Tom,
unfortunately it didn't do the trick. The end of a blog page still showed page numbers with Next or Previous plus arrows.
Best regards,
Tiina
Strange,
Can you provide us temporary site credentials so we could check? You can add it on the Private Information textarea so only support team members can see it.
Perhaps there's simple curly/straight quotation or any syntax issue somewhere in the code that prevents the code from running properly.