Skip to:
Content
Pages
Categories
Search
Top
Bottom

PHP if/else arguments

  • @xanderashwell

    Member

    Hi all,

    I’m used to using conditionals within PHP if/else arguments such as is_page_template, is_page, is_front_page, and so on within WordPress. However, I’d like to apply some within my bbpress theme (to change the title of seperate sections of the forums) and I’d love to know which conditionals are appropriate/different within bbpress.

    Can anyone shed any light on this?

    Many thanks,

    Xander

Viewing 2 replies - 1 through 2 (of 2 total)
  • @finalwebsites

    Participant

    Hi,

    you need this function: bb_get_location()

    for example:

    if (!in_array(bb_get_location(), array('login-page', 'register-page'))) {
    login_form();
    }

    @xanderashwell

    Member

    Hi Olaf,

    Thanks for pointing me in the right direction!

    Thanks also for your plugin solution for changing user’s information fields, I actually found the solution on the finalwebsites’ forums, but re-posted your fix in the forum here: https://bbpress.org/forums/topic/change-profile-information

    You’re a life-saving bbpress & php wizard, and you deserve a shiny gold star for your good work.

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