Improve the Wordpress search box
by Kunal Jain on Mar.07, 2009, under blogs, software
I just edited the search box at Recipe Mobile to remove the search button that used to appear under it. The ‘Search’ button takes up too much space and is frankly unnecessary.  
Most internet users know that if you fill in a text box and hit enter, the website will see that as a click on the button tied to the search box.  Some quick searches on Google got me to Bavotsan.com. Along with with various other PHP tips, the blog also contained a smart way to edit the php code that controls the search box.
The short tutorial on Bavotsan.com uses the default Wordpress theme which contains a file called searchform.php. However, since my theme does not have this file, I had to look around for the appropriate code to edit. Since the search box shows up in Recipe Mobile’s right sidebar, I looked in the file sidebar-right.php in Appearance->Themes in the Wordpress admin menu and found the appropriate code there. 
This is what the new search box looks like now. The text to ‘Type and Hit Enter’ shows up in the search box when it is not being used to educate the few users who might not be net savvy.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.







September 11th, 2009 on 11:10 pm
To the point and an excellent article.
September 13th, 2009 on 10:11 pm
Cool software tips.
October 24th, 2009 on 6:35 pm
Post trackbacks and comments to remote blogs automatically with Trackback Submitter! This tool will submit your comments to millions of blogs automatically. Trackback Submitter – the most powerful tool on the planet to submit trackbacks automatically!