Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Bar

  • @osasko

    Participant

    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)
  • @gpo1

    Participant

    Am awaiting how it’s done!

    @gpo1

    Participant

    Am awaiting how it’s done!

    @xevo

    Participant

    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).

    @xevo

    Participant

    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).

    @nahummadrid

    Participant

    This works for me.

    @nahummadrid

    Participant

    This works for me.

    @hnla

    Participant

    edit/ hmm far too slow :-)

    Use a conditional template tag

    For reference they are found here:

    https://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?

    @hnla

    Participant

    edit/ hmm far too slow :-)

    Use a conditional template tag

    For reference they are found here:

    https://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?

    @gpo1

    Participant

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

    @gpo1

    Participant

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

    @hnla

    Participant

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

    @hnla

    Participant

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

    @gpo1

    Participant

    Thanks…Sorted

    @gpo1

    Participant

    Thanks…Sorted

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Search Bar’ is closed to new replies.
Skip to toolbar