Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


  • Anointed
    Participant

    @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 5 replies - 1 through 5 (of 5 total)

  • JJJ
    Keymaster

    @johnjamesjacoby

    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.


    aro747
    Participant

    @aro747

    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.


    tzeldin88
    Participant

    @tzeldin88

    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.


    lannister
    Participant

    @lannister

    Hey I’ve been adding all the custom css under the scripts tab on the designs settings interface but it seems that not only is it effecting the site design but the back admin area as well.

    For example, I have icons that show up to the left of the navigation menu items but they show up on the back end when you go to “menus”. Also, I increased the font size of widget titles and it increased the font size on the widgets page in the admin section as well.

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