[Resolved] sf menu item state – odd behaviour

Home Forums Support [Resolved] sf menu item state – odd behaviour

Home Forums Support sf menu item state – odd behaviour

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #128368
    Daniel Walker

    Hi Tom, I’m seeing some odd behaviour with a menu item state on my primary navigation menu.

    On the menu I have a few Pages, a couple of category archive links (for custom post types), a bbpress link and a link to my blog index (the page that shows the latest Posts, as defined in Settings > Read).

    When I select any Pages, the menu hover/active/visited states all work perfectly, as shown below.
    Page selected

    However, when I select a category archive or the bbpress index page (set as a ‘category’ in bbpress), the blog index page menu item also switches to the active state, as shown below.
    Category archive page
    bbpress index

    Any ideas as to what could be causing that?

    Thanks,
    Dan

    #128370
    Daniel Walker

    Sorry, I mucked up the link to that first screenshot.
    Page selected

    #128400
    Tom
    Lead Developer
    Lead Developer

    WordPress gets confused when it comes to custom post types, and thinks you’re viewing the blog – so it highlights the blog menu item as well.

    The best way I’ve found to avoid this is to add the link to the Blog or custom post type as a “Custom Link” in “Appearance > Menus” instead of adding it from the “Pages” module (or any of the other modules).

    Can you give that a try and let me know if it works or not?

    #128412
    Daniel Walker

    Yep, that’s fixed it. Excellent. Thanks Tom.

    Dan

    #128413
    Tom
    Lead Developer
    Lead Developer

    Awesome – no problem 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.