Can paginate_links() be customized for a specific category or tag?

by Ead Wig   Last Updated June 12, 2019 07:08 AM - source

I am creating category and tag page templates for my client so they can post news articles to the news category page and specific news pages separated by tag with a pagination nav at the bottom of each page. What I noticed, however, is the pagination nav takes account of all of the posts belonging to any category or having any tag.

I am aware that paginate_links() does not pass an argument in any way similar to the category_name argument for WP_Query(). Keeping this in mind, I spent Googling for a solution to excluding all of the irrelevant posts from the scope of paginate_links().

Can you write paginate_links() so that the function targets a specific category or tag? If so, please help me work out how.

Thank you for reading this.


Related Questions

Customizing comments pagination for bootstrap

Updated July 19, 2017 08:08 AM

paginate_links and query vars

Updated August 07, 2016 08:03 AM