I currently have a portfolio.php page that queries posts that are in the “Portfolio” category. When the user is on the initial landing page, the “Portfolio” navigation item gets the correct active class. But when I go into one of the actual portfolio posts, the Nav item loses its active state.
I know that this is technically correct behavior, but is there a way I can force the wp_list_pages function to apply an active class to a certain nav item based on the post category?
Right now my wp_list_pages function is in my header.php.
- The topic ‘wp_list_pages – Active Page on a Collection of Posts?’ is closed to new replies.