How navigation works in custom loop within shortcode?

if you look at previous_posts_link() and next_posts_link() in source, you’ll see why they don’t work, they use the global $paged and $wp_query vars to format the links and determine whether or not they appear. you’ll have to roll your own pagination using the paged and max_num_pages vars in your custom query.

Leave a Comment