WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove SEARCH button Main Nav Bar (13 posts)

  1. Jan Nelson
    Member
    Posted 2 years ago #

    Theme: Twenty Eleven 1.1
    How to remove the search button feature from the main navigation bar?
    Can't find this anywhere, please help!

  2. kc5gjn
    Member
    Posted 2 years ago #

    I would like to know this too. I am using 2011 and when I turn off the header text it causes my search box to cover my entire menu. This only seems to be a problem in IE. I use Firefox and it works fine.

  3. JamiGibbs
    Member
    Posted 2 years ago #

    Go to 'Appearance > Editor > Header (header.php)

    Find the following close to the end:

    <?php get_search_form(); ?>

    Remove it, or, replace it with the follow:

    <!-- <?php get_search_form(); ?> -->

    Then click 'Update File'

  4. kc5gjn
    Member
    Posted 2 years ago #

    well that got rid of it in Firefox but it still shows up in IE and is still covering the menu.

  5. JamiGibbs
    Member
    Posted 2 years ago #

    Try clearing your browser cache.

  6. kc5gjn
    Member
    Posted 2 years ago #

    well I have changed the settings to include the text up and changed them back and it is showing the changes I have also used ctrl+f5 and that is not working.

  7. kc5gjn
    Member
    Posted 2 years ago #

    Ok I deleted the browsers cache and tried it all again. Now the search bar isn't covering my menu but it is still there. That solves my problem but not the original posters problem.

  8. kc5gjn
    Member
    Posted 2 years ago #

    got it figured out. There are two instances of:

    <?php get_search_form(); ?>

    Replacing them both got rid of it completely

    <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
    <!-- <?php get_search_form(); ?> -->
    </div>
    <?php
    else :
    ?>
    <!-- <?php get_search_form(); ?> -->

  9. Jan Nelson
    Member
    Posted 2 years ago #

    Thanks SO much you two. Followed your posts and was able to fix absolutely painlessly! :) These forums are really a God send for a novice and I believe I can speak for a vast number of WP users, we all THANK YOU all for taking precious time to pass along your knowledge. Cheers from the East Coast, USA.

  10. Ca1mdown
    Member
    Posted 2 years ago #

    Hmm, That was very helpful. Although my nav menu is still acting like there is a search there (it's pushing my nav menu items into a new row, even though it appears to have plenty of space left). How do I take the search removing to the next level?

    Edit: I got what I wanted by just deleting the search div:

    <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
    <!-- <?php get_search_form(); ?> -->
    </div>
  11. Currie
    Member
    Posted 1 year ago #

    Just used this too, months later. Thanks!!

  12. LZOZ
    Member
    Posted 1 year ago #

    Hello, I am very new to this.

    Can I literally delete this?
    <?php get_search_form(); ?>

    And replace with this?

    <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
    <!-- <?php get_search_form(); ?> -->
    </div>
    <?php
    else :
    ?>
    <!-- <?php get_search_form(); ?> -->

    thank you so much for your help!

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

  13. alisonkrupnick
    Member
    Posted 1 year ago #

    I am trying to remove the search header in Creativix, as it blocks my site name and tag line. In appearance/headers there is no opportunity to mess with code.

    site is http://www.alisonkrupnick.com

    Please help, as this is preventing my site launch.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags