Navigation Menu IDs & Classes
[resolved] Custom post types (2 posts)

  1. Cultivate
    Posted 3 years ago #

    Is there anyway to get the plugin to add the current_page_item class to custom post type menu items?

    I have a custom post type setup to display job posts with the standard posts appearing under the news menu item. When i click on the Jobs menu item to display the job posts the news menu item has the current_page_item class so the wrong item is highlight.

    Any help appreciated.


  2. Aaron T. Grogg
    Plugin Author

    Posted 3 years ago #

    This sounds like an issue with your category structure...

    WP handles the logic behind which HTML elements should get "current" status, including:

    • current-menu-item
    • current-menu-parent
    • current-menu-ancestor
    • current-page-item
    • current-page-parent
    • current-page-ancestor

    All of the above are items you can choose to include or exclude from your final mark-up, so, if something is appearing in the wrong place, it has to do with your nesting structure, not something WP or the plug-in is doing...

    Hope this helps, if you'd like deeper help, feel free to contact me directly, and please provide a URL where I could see exactly what you mean.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Navigation Menu IDs & Classes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic