Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Bar

  • Avatar of osasko
    osasko
    Participant

    @osasko

    Hi,

    I want to remove the search bar from my front-page.

    Don’t mind it being on the other pages.

    How do you actually remove it from just that one page ?

    Thanks for your help.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Am awaiting how it’s done!

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Am awaiting how it’s done!

    Avatar of Xevo
    Xevo
    Participant

    @xevo

    Just take it out of your home.php? Or build an if statement around it.

    if(!bp_is_front_page()) {
    // show search form
    }

    Edit: See that the standard theme doesn’t have a home.php, my bad. Script should work either way (only now in header.php).

    Avatar of Xevo
    Xevo
    Participant

    @xevo

    Just take it out of your home.php? Or build an if statement around it.

    if(!bp_is_front_page()) {
    // show search form
    }

    Edit: See that the standard theme doesn’t have a home.php, my bad. Script should work either way (only now in header.php).

    Avatar of Nm
    nm
    Participant

    @nahummadrid

    This works for me.

    Avatar of Nm
    nm
    Participant

    @nahummadrid

    This works for me.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    edit/ hmm far too slow :-)

    Use a conditional template tag

    For reference they are found here:

    http://codex.buddypress.org/developer-docs/conditional-template-tags/

    You will want something like:

    bp_is_front_page()

    Wrap the div#search-bar in an:

    <?php if(!bp_is_front_page()): ?>
    <div id="search-bar">

    </div><!-- #search-bar -->
    <?php endif; ?>

    Something like that anyway.

    Am awaiting how it’s done!

    Surely Gpo1 you had an inkling how to do this hadn’t you?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    edit/ hmm far too slow :-)

    Use a conditional template tag

    For reference they are found here:

    http://codex.buddypress.org/developer-docs/conditional-template-tags/

    You will want something like:

    bp_is_front_page()

    Wrap the div#search-bar in an:

    <?php if(!bp_is_front_page()): ?>
    <div id="search-bar">

    </div><!-- #search-bar -->
    <?php endif; ?>

    Something like that anyway.

    Am awaiting how it’s done!

    Surely Gpo1 you had an inkling how to do this hadn’t you?

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Is it home.php or header.php to look for that script?

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Is it home.php or header.php to look for that script?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Have a look through the files it will only take a second ;-)

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Have a look through the files it will only take a second ;-)

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Thanks…Sorted

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Thanks…Sorted

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

You must be logged in to reply to this topic.