WordPress.org

Ready to get started?Download WordPress

Forums

Menu item highlighted if page belongs to specific category (1 post)

  1. drhodes
    Member
    Posted 2 years ago #

    I'm looking for a way to dynamically highlight a menu item anytime a user is viewing a page that is assigned to a given taxonomy or category. For example a nav bar at the top with items "Products" and "Strategy". Any page or post that is created and has the category or taxonomy "product" would cause the Products menu item to be highlighted when you are on the page for that product. I'm thinking if I could figure out a way to just apply a class to that item based on the criteria above, that would do it. Any ideas? I'm stumped on this one.

Topic Closed

This topic has been closed to new replies.

About this Topic