How To Change Navigation Links Text for a Blog Archive?
|
/ Documentation /Custom Code Snippets/Blog Filters/ How To Change Navigation Links Text for a Blog Archive?

How To Change Navigation Links Text for a Blog Archive?

Depending on your settings, your Blog Archive page might have multiple pages. In this case, the navigation links are being used to switch between different pages. These navigation links are displayed at the bottom of the page as “Previous Page” and “Next Page”.

Blog Archive Navigation Links

You can change these labels with any custom text by adding a custom code (filter). To do this, you would need to add the following filter to the functions.php file of your Child Theme:

add_filter('astra_default_strings' , 'call_back');
 function call_back( $default ){
 $default['string-blog-navigation-previous'] = '<span class="ast-left-arrow">&larr;</span> ' . __( 'Custom Previous Page', 'astra' );
 $default['string-blog-navigation-next'] = __( 'Custom Next Page', 'astra' ) . ' <span class="ast-right-arrow">&rarr;</span>';
 return $default;
 }

This code will rename your navigation links to “Custom Previous Page” and “Custom Next Page”. You can replace these link labels with any other text by modifying the bolded part of the code above.

Filter To Change Navigation Links Text for a Blog Archive

If you don’t have your Child Theme installed, please check this article on how to do it. Also, If you are not sure how to add this code, please check this article.

If you need to do modify navigational links on your Single Posts, please check out this document.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

This field is required.

REWIND

YEAR IN REVIEW

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form