WordPress.org

Ready to get started?Download WordPress

Forums

Navigation states for blog posts (3 posts)

  1. brian914
    Member
    Posted 2 years ago #

    I am using wp for a cms. My blog is under one of the pages called "Tastings & Events" which is a page that I am applying a custom template to. In that custom template I am looping through all the posts, which makes this my blog index page.

    For the navigation I am using a wp menu and so when I am on that page, I get "current-menu-item" and "current_page_item" which lets me give the navigation the on state, indicating that i am on that page.

    When I now click on any of the blog posts, I no longer get anything to indicate that they are pages under "Tastings & Events" and so I can't style the main navigation.

    My question is that I need to do to make it clear to wp that "Tastings & Events" is my blog index, and hence getting it to give the menu the appropriate classes?

    Thank you for any help with this!

  2. Andrew Bartel
    Member
    Posted 2 years ago #

    Link to your site?

  3. James Kirk
    Member
    Posted 2 years ago #

    A link to your site/blog page would be most helpful, brian914!

    But I think I understand what you are describing. The challenge is once the site visitor clicks to see the actual blog post, they are technically no longer "under the Tastings & Events" page, from WordPress' perspective. The install is now using the single.php page (or some other custom page you might have set up), but they are "posts" not "pages".

    I know that doesn't answer you question, per se, however, it might point you in a better direction.

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic