WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Cultivate
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/navigation-menu-ids-classes/

  2. Aaron T. Grogg
    Member
    Plugin Author

    Posted 1 year 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.

    Cheers,
    Atg

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic