Skip to:
Content
Pages
Categories
Search
Top
Bottom

Determining if on bbpress page

  • Is there a function (or other method) available to determine if the current page is a bbpress related page (forum, topic, reply or other)? Something along the lines of the wordpress function is_page()

    It would seem that bbPress uses custom post types, and I’ve tried this with no luck:

    if(get_post_type() == ‘forum’ OR get_post_type() == ‘topic’ OR get_post_type() == ‘reply’)

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Turns out I had a nesting issue, the above approach seems to work fine:

    if(get_post_type() == ‘forum’ OR get_post_type() == ‘topic’ OR get_post_type() == ‘reply’) {

    //user is viewing a forum page

    }

    thanks phrough!!

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