• Resolved robgnyc

    (@robgnyc)


    Is there a way to force a menu item to highlight when you are on a custom post type page or custom taxonomy archive page?

    I have a custom post type called “knowledge-center”. The actual knowledge-center page is a custom page which lists out the top 20 questions. I then have a custom taxonomy called agencies so that knowledge-center/agency-slug shows the top questions for each agency.

    The actual page that shows a single custom post type item is mapped to /knowledge-center/question/custom-post-type-post.

    On any of these pages where /knowledge-center is part of the URL, I want to force the Knowledge Center menu item to highlight.

    Is there a way to do this?

    https://www.ads-software.com/plugins/custom-post-type-ui/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    You’d have to check for available html classes on the menu items. I believe WP core typically adds “current” to class names, which may help. Otherwise it’s going to be some sort of custom solution that I don’t have a specific answer for.

Viewing 1 replies (of 1 total)
  • The topic ‘Force highlight of menu item for custom post type’ is closed to new replies.