• I have an issue which i cant wrap my head around, as im lacking knowledge. WordPress is in this instances not generating any specific class that i could address and this is my problem, NOT the CSS.

    I have a theme that comes with some custom post types ie locations and tours. I have different cases and issues:

    1) I have a custom post type location and I use it in the menu directly: [ redundant link removed ] When i choose a location in this page, ie Masai Mara I have managed to keep “Kenya” in my submenu active but how do i manage to also highlight the Main Menu item “Kenya”?

    2) In some cases i need to use a page with a certain template to get a list design – ie /wildlife-safaris When on this list and clicking a specific safari that navigation is not highlighted anymore. How can i do this? At a later point Wildlife safaris might be a main navigation with also a submenu with different types of wildlife safaris (I have taxonomies category and tag) to choose from. How can i manage this?

    I think i can either use a php or javascript solution – i read about different solutions but not sure where to start to get this work.

    Thanks, Iris

    • This topic was modified 4 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Either PHP or JS can be made to work, provided the code has all the information it needs to make it happen. It may be cumbersome to do so with JS. I’m inclined to use PHP. For the default WP nav menu we can use a custom walker class to best accommodate any situation. As you’re using a mega menu, I’m unsure of the proper approach.

    The sort of information you are trying to present in the menus is usually presented as a bread crumb trail. You might consider using a breadcrumb trail so that the context of one’s place in your site is separate from menu UI information.

Viewing 1 replies (of 1 total)
  • The topic ‘menu highlighting issue (pages with custom post type entries and history)’ is closed to new replies.