wpvidZ

Learn WordPress With Video Tutorials

  • Blog
  • Browse
    • Backup & Restore
    • WordPress Localhost
    • WordPress Hosting
    • WordPress themes
    • Version Updates
    • Plugin Tips
    • Security
    • Tutorials
    • WordPress SEO
    • WP Miscellaneous
    • Sitemap
  • WP 5+ Tutorial
  • Search
wpvidZ Blog WordPress themes How to remove Twenty Eleven Search Form from Header

WordPress themes

How to remove Twenty Eleven Search Form from Header

Last updated on July 22, 2017
Posted on August 1, 2011

Twenty Eleven search form box and Twenty Ten?

If your blog is currently using WP 3.2’s Twenty Eleven theme, you will notice it has search box in the header part of the theme’s layout.

What I really like is the Twenty Eleven search form is actually placed on right in the header’s right part, which most of people want to implement into Twenty Ten theme.

In the past on Twenty Ten theme, in that part of its header were site description.

Now it looks like wordpress developer want to make use of the theme optimally, by placing that box, so when your visitor needs to search on something in your post, they can easily type in something in that box.

Now Twenty Eleven search form is in the header

From now on, we have a default theme that has the search box in the header part as we always wanted, but some of us want to remove it.

It can be many reasons why we want to remove that Twenty Eleven search box, it can be that they do not like the looks of it, or it could be they already have search form in their wordpress widgets, and then to avoid having multiple search boxes in one page that surely confuses their reader, they might want to remove the header’s search box and use the widget instead.

It actually reminds me of one of my readers some months ago, that asked where they could find my search box, because they really need it especially when we have a blog which contains hundreds of posts to find a specific content easily.

From that email, I realized that replacement of our search boxes are really important, because when we put it on a hidden space or a place where it is mixed up with other widgets, our visitors can barely find it.

This means, we have less usability of our content.

So how do I remove Twenty Eleven Search form box?

Twenty eleven search box code is actually placed in header.php.

But in this tutorial, we are using Twenty Eleven child theme, and then copy and editing the original header.php inside the child theme.

Video Tutorial

  • Is my site loading fast? I use this shared hosting
  • Try my theme >

Steps:

1. I assume you are now using the child theme, if you haven’t done so, please see this child theme tutorial.

2. Open the original Twenty Eleven theme folder, and look for header.php. After that, copy that file into the child theme folder.

3. Once it is copied, open it with text editor, in the video, I edited the file directly from my cPanel file editor.

4. Inside the header.php, look for this line:

<?php
// Has the text been hidden?
if ( 'blank' == get_header_textcolor() ) :
?>
<div>
<?php get_search_form(); ?>
</div>
<?php
else :
?>
<?php get_search_form(); ?>
<?php endif; ?>

If you use cPanel code editor, it is about in line 98-100.

5. Now, you have two options, either to delete those lines, or commenting them out.

After commenting them out:

<!--
<?php
// Has the text been hidden?
if ( 'blank' == get_header_textcolor() ) :
?>
<div>
<?php get_search_form(); ?>
</div>
<?php
else :
?>
<?php get_search_form(); ?>
<?php endif; ?>
-->

Screenshot:

twenty eleven search
The line of Search Box codes

The difference is, it has “commented” code.

I would personally comment them out, because if one day, you want to have the box back, you can just easily removing the comments, and will easily place back the box.

If you delete them, it will be possible to place the box back, but then you will have to look in the original theme files again, which is not bad, but less practical than when you comments the code out.

6. Don’t forget to save the changes in your file, and refresh your browser.

So I did remove Twenty Eleven search form box, by commenting the search form code.

header in twenty eleven twentyeleven Wordpress

Latest Posts

  • Twenty Nineteen Theme Full Tutorial – Creating a Website
  • Uninstall W3 Total Cache Plugin – Incredibly Easy!
  • Create WordPress Website 2018 on SiteGround Genesis
  • WordPress Noopener Noreferrer Rel Attribute Quick Fix
  • WordPress CDN Setup with MaxCDN and W3 Total Cache Plugin
  • Twenty Seventeen One Page Parallax Scrolling Website Style
  • How To Add Google Map in WordPress Contact Page
  • WordPress 4.7 Justify Text and Underline
  • Twenty Seventeen Footer “Proudly Powered By WordPress” Text
  • How To Add YouTube Subscribe Button To WordPress Website
← Twenty Eleven white space above header [How to remove it]
→ Add sidebar widgets in Twenty Eleven theme

Comments

  1. Chris Saunders says

    August 2, 2011 at 8:33 am

    Good tutorial — straight and to the point, and saved me some time tracking down where this code was hiding. Thanks for taking the time to write this up.

  2. seba says

    August 25, 2011 at 4:22 pm

    thanks 🙂

  3. MissFancye says

    September 17, 2011 at 10:03 am

    Thanks Kimmie!! This helped me get rid of my searchbox. I am LOVING your videos they are sooooo helpful for a new blogger like myself. Please keep making these helpful videos with accompanied posts.

    • Kimi says

      September 18, 2011 at 1:17 pm

      Hello MissFancye!!

      Welcome to my blog:)

      I am glad you found the videos are helpful, and thank you sooooooooo much for the nice words.

      Also thanks for coming accross and leaving a comment!

      Good luck with your blog

      Kind regards
      Kimi.

  4. Dan says

    January 5, 2012 at 4:34 am

    Thank you very much Kimi from saving my hair from getting pulled out, your tutorial was more informative than i was expecting. You could even split this one video into three mini tutorials. How to use file manager in host gator. How to assemble a child theme. How to comment out/disable the search box. Your a great teacher.

    Cheers

    • Kimi says

      January 5, 2012 at 9:57 am

      Hi Dan!

      Welcome to my blog, splitting one video into mini tutorials is a brill idea, never thought about this before!

      Thank you for this, and also for your nice words.

      Best wishes

      Kimi

  5. enåsen says

    January 15, 2012 at 4:46 pm

    Thanks! just what I was looking for!

Comment form on this post is closed after 60 days.

Search

Worth Reading

  • Twenty Nineteen theme tutorialTwenty Nineteen Theme Full Tutorial - Creating a Website
  • Twenty Seventeen One Page ParallaxTwenty Seventeen One Page Parallax Scrolling Website Style
  • Twenty Seventeen Proudly Powered By WordPress codeTwenty Seventeen Footer "Proudly Powered By WordPress" Text
  • Where your child theme folder should be located inside themesHow To Create WordPress Child Theme Manually or With Plugin
  • How to Remove Twenty Fourteen Author Name or Link
  • How I add thumbnails with Twenty Twelve theme
  • Change Default Green Color WP 2014 Theme
  • Showing Twenty Fourteen Thumbnail in A Smaller Size
  • How To Style WordPress Caption in WP Twenty Fourteen Child
  • Proudly Powered By WordPress Twenty Fourteen

Backup & Restore

Backup WordPress Without a Plugin or FTP

Export WordPress Database using phpMyAdmin

BigDump Alternative – When BigDump Failed Importing Large WP Database

At This Place The Current Query Includes More Than 300 Dump Lines

View All..

Live Online Website

View All..

Offline Installation

How to Upload WordPress localhost to live server manually

Steps to Install WordPress on Windows 8 and WAMP 2.4

Install WordPress on Mavericks OS X 2014

Maximum upload file size in WAMP WordPress

View All..


WPvidz Hosting Image

  • About Me
  • Contact
  • Affiliate Disclosure
  • Privacy Policy
  • Term of Use

Copyright© 2023 wpvidz.com SG2021 | sitemap.xml


WPvidz.com is independent from WordPress.org but is proudly powered by WordPress & its block-based editor (Gutenberg)

WpvidZ.com uses cookies" to give you the best browsing experience possible. If you click "I Accept" below then you are consenting to this. For more information about your privacy settings on this website, please visit the Privacy Policy page. I Accept