Skip to content

Instantly share code, notes, and snippets.

@Nikschavan
Created August 21, 2018 05:42
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/299d359e237eb15cbafe6c39830c83fe to your computer and use it in GitHub Desktop.
Save Nikschavan/299d359e237eb15cbafe6c39830c83fe to your computer and use it in GitHub Desktop.
Load Next and Previous from same category (term) - Astra Theme
<?php // don't copy this line in your code.
function previous_posts_from_same_category( $args ) {
$args['in_same_term'] = true;
return $args;
}
add_filter( 'astra_single_post_navigation', 'previous_posts_from_same_category' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment