Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nikschavan/577328e8602ba737cb13d1cca82704b5 to your computer and use it in GitHub Desktop.
Save Nikschavan/577328e8602ba737cb13d1cca82704b5 to your computer and use it in GitHub Desktop.
Astra - Post title instead of next previous arrows
<?php // don't copy this line in your code.
function your_prefix_next_previous_post_titles() {
return array(
'next_text' => get_the_title( get_next_post() ) . ' <span class="ast-right-arrow">&rarr;</span>',
'prev_text' => '<span class="ast-left-arrow">&larr;</span> ' . get_the_title( get_previous_post() ),
);
}
add_filter( 'astra_single_post_navigation', 'your_prefix_next_previous_post_titles' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment