[Support request] Filter for changing the pagination Previous / Next text?

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Filter for changing the pagination Previous / Next text?

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8789
    shpr
    Participant

    Hello,
    do you have a filter for changing the pagination text in wp show posts?
    Thanks

    #8807
    Tom
    Keymaster

    Hi there,

    There aren’t any filters, but you might be able to do this:

    add_filter( 'gettext', function( $translated_text, $text, $domain ) {
        if ( '← Previous' === $translated_text ) {
            $translated_text = 'Your custom text';
        }
    
        if ( 'Next →' === $translated_text ) {
            $translated_text = 'Your other custom text';
        }
    
        return $translated_text;
    }, 20, 3 );

    Let me know 🙂

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