How to Restrict Previous & Next Post Link to Posts of Same Category?


I am using a category to segregate all posts of that one category to feel like a complete website sub-section. So the main posts feed is using a plugin to hide posts of that category, and I am using a menu item in the header to link to a page showing posts of only that category.

However, once you click on a post, the next and previous will browse through all posts regardless of categories and I would want it to remain within the context of that category.

Likewise, in the full regular feed, once a post is open I would like the navigation to exclude that category.

Ghandi Manning 4 months 0 Answers 10 views 0

Leave an answer