Skip to:
Content
Pages
Categories
Search
Top
Bottom

I need function "if is home" to bbPress


  • hpguru
    Member

    @hpguru

    I use on my WordPress function ´<?php if (is_home()) { echo ” – My blog slogan”;} ?>´ on index.php.

    But now i’m back to bbPress. Nothing in SMF or phpBB to me, try it and forget it… Install 1.0.2 and now i need slogan to just index.php.

    Thank you.

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

  • kevinjohngallagher
    Member

    @kevinjohngallagher

    front-page.php in your theme folder.

    Alternatively, I’ve a WordPress mimic plugin I’ll be releasing next week which should solve alot of WP to bbP issues.


    Gautam Gupta
    Moderator

    @gautamgupta

    You can either put the code in front-page.php as Kevin told or use if ( bb_is_front() ) { /* Code Here */ }


    hpguru
    Member

    @hpguru

    But is there any function to title. I need slogan in web browser title and need “if is home”. If it is right, then show – My forum slogan.


    Gautam Gupta
    Moderator

    @gautamgupta

    You can use the bb_is_front function (my previous comment went in spam).


    kevinjohngallagher
    Member

    @kevinjohngallagher

    No, there is no equivalent to the best of my knowledge.

    You could write one yourself that tests for the URL or basename of the file/folder you’re in – it’s not ideal, but very little is here.


    zaerl
    Participant

    @zaerl

    bb_is_front()


    kevinjohngallagher
    Member

    @kevinjohngallagher

    brilliant, thanks zaerl.

    While you’re here mate, are there any more functions like that (for defining testing for pages) ?

    Thanks


    hpguru
    Member

    @hpguru

    Thank you!!! This work fine.

    Have a nice day!


    zaerl
    Participant

    @zaerl

    bb_is_front()
    bb_is_forum()
    bb_is_tags()
    bb_is_tag()
    bb_is_topic_edit()
    bb_is_topic()
    bb_is_feed()
    bb_is_search()
    bb_is_profile()
    bb_is_favorites()
    bb_is_view()
    bb_is_statistics()

    that are all wrappers (a mojor part of them) of the bb_get_location() function which returns:

    front-page
    forum-page
    tag-page
    topic-edit-page
    topic-page
    feed-page
    search-page
    profile-page
    favorites-page
    view-page
    stats-page
    login-page
    register-page


    hpguru
    Member

    @hpguru

    Thank you!

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

You must be logged in to reply to this topic.