current-menu-item class for custom post type parent
Im having a problem with my menu and custom post type.
I have a custom post type of "services". I have created new page for it called Services. On that page Im displaying a list of all the post from that custom post type. The current-menu-item class is working as itended.
But the problem is when I click on one of the services and go to mysite.com/services/service-1, the current-menu-item from services page in menu dissapears. I need to show that this current post is a child of Services page.
All of the menu items have the same HTML:
li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-23"a href="http://localhost/wordpress/sluzby/"Služby/a/li
There is no CSS class that I could use to style this link as parent. Something like current-menu-parent or something. How could I fix this? Thanks.
Topic post-class menus custom-post-types Wordpress
Category Web