Skip to content

Snippet: Alter The Next/Previous Links Text

By default the next and previous links in the Total theme display the title of the next/previous post. You can easily change this to your own custom text if you want via your child theme.

// Change next text
function myprefix_wpex_next_post_link_title() {
	return 'Next';
}
add_action( 'wpex_next_post_link_title', 'myprefix_wpex_next_post_link_title' );

// Change prev text
function myprefix_wpex_prev_post_link_title() {
	return 'Previous';
}
add_action( 'wpex_prev_post_link_title', 'myprefix_wpex_prev_post_link_title' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top