Skip to:
Content
Pages
Categories
Search
Top
Bottom

is_bbpress not working

  • @bobdobbs

    Participant

    I’m trying to detect requests for the bbpress forum index page.

    Initially I tried ‘bbp_is_forum_archive()’.
    This doesn’t return true from the forum archive page.

    I decided to test if any bbpress conditional tags were working, so I tested ‘is_bbpress’, because the function calls many (maybe all?) of the other conditionals.

    However, ‘is_bbress’ doesn’t return true either.

    However, on any page in my site, whether bbpress is on that page or not, this condition returns true:
    ‘if ( ! is_bbpress() )…’

    What could be happening here?

    This is my function and the hook I’m using:

    add_action('init', 'test_bbpress');
    function  test_bbpress() {
    
        if (  is_bbpress()  ) {
    	wp_die("got to the forums page") ;
        }

    }

Viewing 1 replies (of 1 total)
  • @robin-w

    Moderator

    there is an action hook on the forums index so

    add_action ('bbp_template_before_forums_index' , 'test_bbpress');

    shoul dwork

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