[Resolved] Post navigation change tekst

Home Forums Support [Resolved] Post navigation change tekst

Home Forums Support Post navigation change tekst

  • This topic has 3 replies, 2 voices, and was last updated 9 years ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #117930
    Damiaan van Vliet

    Hi support,
    Is it possible to change the Next and Previous links beneath a post to actually the text Next post / Previous post? Now I see the title of the post.
    I tried following code for functions.php (I have child theme) I found with Google but not working:

    //
    add_filter( 'tc_singular_nav_next_text' , 'my_nav_buttons_text' );
    add_filter( 'tc_singular_nav_previous_text' , 'my_nav_buttons_text' );
     
    function my_nav_buttons_text() {
      switch ( current_filter() ) {
        case 'tc_singular_nav_previous_text':
          return 'previous post &larr;'; // <= your custom text here
        case 'tc_singular_nav_next_text':
          return '&rarr; next post'; // <= your custom text here
      }
    }

    Thanks!

    #117995
    Tom
    Lead Developer
    Lead Developer

    You can overwrite our core function by adding this: https://gist.github.com/generatepress/bb5a62c2a94b94bedad0

    That should do it ๐Ÿ™‚

    Adding PHP: http://generatepress.com/knowledgebase/adding-php-functions/

    #118046
    Damiaan van Vliet

    Great Tom! And you’re so quick… Thanks a lot.
    And… like you already supposed it works.

    Greetings from the Netherlands.

    #118084
    Tom
    Lead Developer
    Lead Developer

    Glad I could help! ๐Ÿ™‚

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