I have been trying to get the current menu item to my custom post types. I cannot get it to work, and when looking at my menu, I am wondering, that if everything is allright.
Which are the correct classes WordPress should generate, when displaying pages, archives and custom post types?
I have this link explaning them: http://premium.wpmudev.org/blog/wordpress-menu-css/
But my page for example has the following classes:
menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-146 current_page_item menu-item-147
And my custom post type:
menu-item menu-item-type-taxonomy menu-item-object-category menu-item-187
Which seems strange, since the menu is a link to the category and archive page, not a taxonomy?
Thanks in advance
are
type of taxonomies. – jep Jan 2 '15 at 10:36menu-item-type-taxonomy
andmenu-item-object-{taxonomy-name}
, so there is nothing strange because category is a taxonomy (here you are wrong when say that "the menu is a link to the category and archive page, not a taxonomy" – cybmeta Jan 2 '15 at 10:51