• Hi,
    On posts page, I would like to change the text of these buttons. How can I do that?
    A solution via functions.php will be helpful, too.

    Thanks, Mor

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Please add the below snippet code in the functions.php file of your child theme and check.

    function wp_post_nav_translate( $translated_text, $text, $domain ) {
        switch ( $translated_text ) {
          case 'Previous Post' :
           $translated_text = __( 'Prev text ', 'wp-post-nav' );
          break;
           case 'Next Post' :
           $translated_text = __( 'Next Text ', 'wp-post-nav' );
          break;
        }
        return $translated_text;
    }
    add_filter( 'gettext', 'wp_post_nav_translate', 20, 3 );

    PS- Change the texts in the above code according to need.

    Thread Starter mor3311

    (@mor3311)

    Hi,
    it works, thanks alot! ??
    Mor

    • This reply was modified 2 years, 10 months ago by mor3311.

    You are most welcome and glad to hear that solution worked well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Next \ Previous post text’ is closed to new replies.