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 3 replies - 1 through 3 (of 3 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.


    JJJ
    Keymaster

    @johnjamesjacoby

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


    aussiemike
    Participant

    @aussiemike

    Hi there
    I know this is a very old post but I am also looking for conditionals to show a particular template layout. I have posted at the following link.

    If someone could help me it would be appreciated.

    Determining Theme Layout for bbPress

    Regards
    Mike

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