Skip to:
Content
Pages
Categories
Search
Top
Bottom

Check if we are under a certain category/forum

  • @myrko

    Participant

    In the php-template displaying the forums, I want to check if the current forum/topic/… displayed is below a certain bbpress subforum/category.

    The purpose of this is to show different wordpress menus depending on if the user is looking at the english part or the german part of the forums.

    My question is: Is there a php-code to handle this?

    Like:

    if (we are under the german category) display german menu; 
    else display english menu;

    Thanks! 🙂

Viewing 1 replies (of 1 total)
  • @robkk

    Moderator

    you of course pass the ids of the specific forums and categories in each ()

    this for category

    if( bbp_is_forum_category() ) {

    and i think this for forum

    if( bbp_is_forum() ) {

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