Skip to:
Content
Pages
Categories
Search
Top
Bottom

php function to tell (in a template) whether it is bbpress?


  • pjv
    Participant

    @pjv

    using bbpress 2.2.4, wordpress 3.5.1

    I want to make some conditional changes to my main template depending on whether it is rendering bbpress forums or the rest of the site.

    something like:
    ` if (this_is_a_bbpress_page()) :
    div class=”abc”
    else :
    div class=”xyz”
    endif;`

    Is there something like that this_is_a_bbpress_page() function?

Viewing 2 replies - 1 through 2 (of 2 total)

  • pjv
    Participant

    @pjv

    looks like it might be `is_bbpress()` that i am looking for. will report back if that doesn’t work.

    EDIT: yup, that was it.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    You’re correct, `is_bbpress()` should be what you’re looking for.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.