I expect to always navigate to the next post in category 5, but I’m getting posts from other categories and I can’t figure out why this isn’t working after reading the documentation on this function.
Hi, thanks for the replies.
I tried the above code but I have the same issue.
Each post in this site is in a single category, so I know that isn’t the problem.
I’ll try the Query Monitor next to see what exactly is happening.
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘next_post_link not limiting by category’ is closed to new replies.