WordPress.org

Ready to get started?Download WordPress

Forums

adding current_page_parent for a page displaying custom post type (5 posts)

  1. mmatti
    Member
    Posted 3 years ago #

    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_parent css 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.

  2. lorpag
    Member
    Posted 3 years ago #

    i've the same issue!!!

  3. paolo.valier
    Member
    Posted 3 years ago #

    me too!

  4. depi
    Member
    Posted 3 years ago #

    Same issue, it adds the current_page_parent to the page I setup in the Reading for blog posts.

  5. Arvid Eriksson
    Member
    Posted 3 years ago #

    Me too!? I found this: http://wordpress.org/support/topic/missing-current_page_parent-css-class-for-custom-post-types
    But like "Brig01" says, it seems like a workaround.

Topic Closed

This topic has been closed to new replies.

About this Topic