Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Bar


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

  • gpo1
    Participant

    @gpo1

    Am awaiting how it’s done!


    gpo1
    Participant

    @gpo1

    Am awaiting how it’s done!


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


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


    Nahum
    Participant

    @nahummadrid

    This works for me.


    Nahum
    Participant

    @nahummadrid

    This works for me.


    Hugo Ashmore
    Keymaster

    @hnla

    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?


    Hugo Ashmore
    Keymaster

    @hnla

    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

    @gpo1

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


    gpo1
    Participant

    @gpo1

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


    Hugo Ashmore
    Keymaster

    @hnla

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


    Hugo Ashmore
    Keymaster

    @hnla

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


    gpo1
    Participant

    @gpo1

    Thanks…Sorted


    gpo1
    Participant

    @gpo1

    Thanks…Sorted

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