wp_list_pages - Active Page on a Collection of Posts? (2 posts)

  1. Pring4
    Posted 6 years ago #

    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.

  2. Pring4
    Posted 6 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.