Customize the Posts Archive pagination text in BB Theme

If you want to customize the pagination text under the Posts list on the Posts Archive (“Newer Posts / Older Posts”) and don’t use Beaver Themer, you can use gettext as it’s a translatable text:

function my_text_strings( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
        case '« Newer Posts' :
            $translated_text = __( '« New text for Newer Posts', 'fl-automator' );
        case 'Older Posts »' :
            $translated_text = __( 'New text for Older Posts »', 'fl-automator' );
    return $translated_text;
add_filter( 'gettext', 'my_text_strings', 20, 3 );

If your site language is not EN, replace the strings to customize — Newer Posts and Older Posts by the one provided in your language.

Also, gettext can be used more largely to customize any translatable text.

1 Like