[Support request] Blog post navigation – Translating or omitting Next & Previous

Home Forums Support Blog post navigation – Translating or omitting Next & Previous

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1498073
    T

    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

    #1498199
    David
    Staff
    Customer Support

    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/

    #1498757
    T

    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

    #1498917
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #1500717
    T

    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

    #1500772
    Elvin
    Staff
    Customer Support

    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.

    A wise man once said:
    "Have you cleared your cache?"

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.