adding current_page_parent for a page displaying custom post type
-
Hi,
I’m doing a small-business site and have 2 kinds of posts: blog posts and products (created as custom post type) and have these 2 pages in navigation menu: Blog and Products.
The Blog page is displaying blog posts with index.php file, and Products page is displaying product posts with products.php template file.Now it doesn’t matter if I view post or product- it’s always the Blog page that’s getting
current_page_parentcss class (I reckon it has sth to do with “Posts page: Blog” being selected in Reading Settings in admin).I would like to have that class in menu for Blog when viewing blog posts, and for Products when viewing products.
Please help.
The topic ‘adding current_page_parent for a page displaying custom post type’ is closed to new replies.