Skip to:

WP navigation looses 'focus' when in a sub-forum or topic

  • Anointed


    When I click on the forum homepage navigation link then the navigation link stays as ‘active’ as expected.

    However, if I click on any sub-forum or topic, then the navigation is no longer in the ‘active’ [current-menu-item] state.

    I somewhat understand why this is happening, but wanted to know if there is a way of fixing this issue.

    Is there any way to say if_bbpress() then force the ‘active’ state on the forum navigation link?

Viewing 4 replies - 1 through 4 (of 4 total)

  • John James Jacoby


    I don’t know what you mean by ‘forum navigation link.’

    Hi John,

    I have this same issue. See my other topic here for a better explanation.

    WP Menu does not stay active when navigating forums

    Basically, the WP Menu that is linked to the forum is fine until you start to enter subforums and topics.

    Same goes if you use a bbpress shortcode in a page and link it to a WP Menu item.

    I have the same issue. Basically, the “Forums” button in the main navigation no longer stays highlighted once you enter any part of the forums.



    I solved this with some CSS. First, in WP-Admin > Appearance > Menus, i added a custom CSS class to my tabs (at least my Forum tab and News tab). If you don’t see the CSS-classes field, toggle it on in the Screen-Options. For my Forums tab, i set a CSS class of “nav1-forum” and my News tab got “nav1-news”.

    Then in my CSS file (style.css), i added this to my Active-tab styles
    .bbPress #main-menu #menu-main-menu li.nav1-forums a,
    which makes the Forum tab highlighted whenever bbPress is “on” (based on the body class “.bbPress”.

    And I added this to my Inactive-tab styles:
    .bbPress #main-menu #menu-main-menu li.nav1-news a,
    which forces my News tab (which is for my normal “posts” post-type, the blog area of my site), to appear as Inactive, even though its element actually does incorrectly have the class “current_page_parent”.

    Of course you may need to adjust the IDs in the css, to match your html.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar