Check if on a bbPress Forum Page

These are 3 conditional tags to check if you are on a bbPress forum page. These conditional statements also first check to see if the bbPress plugin for WordPress is active.

Check if on the main bbPress forum archives page:

if ( class_exists('bbPress') ) {
     if ( bbp_is_forum_archive() ) {

            echo 'You are on the Support Forums Archives. These are all the forums.';

     }
}

Check if on a bbPress single forum page:

if ( class_exists('bbPress') ) {
     if ( bbp_is_single_forum() ) {

         echo 'This is a single forum. Here you see all the topics for one forum.';

     }
}

Check if on any bbPress page:


if ( class_exists('bbPress') ) {
      if ( is_bbpress() ) { 

         echo 'This page somehow corresponds to bbPress plugin.';

      }
}

See more:

We've One Response

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]