Support » Themes and Templates » wp_list_pages – Active Page on a Collection of Posts?

  • 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.

Viewing 1 replies (of 1 total)
  • I switched to wp_page_menu instead of wp_list_pages and still can’t figure it out. Although this helped me display my home page as a link.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_list_pages – Active Page on a Collection of Posts?’ is closed to new replies.