Pages of conditioned category posts return another category
-
I am using
in_category('#')
conditional statement to change the navigation class of menu items.This works fine until navigating to next page, when another category is returned.
So, I am using only 2 categories; each post belongs to only one of them. The home page displays only posts from category 2, and the conditional statement returns my desired class when browsing https://localhost/.
The problem occurs when browsing https://localhost/page/2/, when although I see the posts from category 2, conditional statement assigns the class to category 3.
- The topic ‘Pages of conditioned category posts return another category’ is closed to new replies.