Posted: October 13th, 2009 By: Devin Walker
While I was customizing my WordPress theme I decided that the “Search for” text before the Search Box was unneccessary. This is how to take it out using CSS. This way, if you have to upgrade your WordPress version in the future you won’t have to modify the general-template.php file again to comment out the text.
- First, FTP to the appropriate location holding your theme’s stylesheet.

- Modify the style sheet with the appropriate code:
label.screen-reader-text { display:none; }If the CSS above doesn’t work, the class id may be different for some reason… Use Firebug or IE Developer tools to find out the class id:

Here is a link to the forum post that helped me find out how to modify the text:
http://wordpress.org/support/topic/269054
Here is the end result:![]()
Related posts:
- WordPress Alternating Classes It's often very useful to have alternating classes in for styling purposes. Let's say you want every other row to be a darker shading, this is very common and I'll show you how to implement this in WordPress using a simple bit of code. For my example here I will show you how to create [...]...
- WordPress: If URL is Homepage then do this… Question: In WordPress how to I make sure the page loaded is the homepage URL and display some data if the standard WordPress Conditional Tags are not working for my theme?! Answer: Here's a quick snippet of code that will give you an option to do something if these WordPress basic conditional tags are not [...]...
- WordPress Loop: If Parent or Child of Page or Category The WordPress loop is extremely useful when developing customized WordPress solutions. One bit of code I've had to use often is one that will display a set of code if the page or post is a parent of child of a certain category. This is an easy way to display, output, or show data on [...]...
- WordPress Fix: Attribute “role” is not a valid attribute I like to design websites that are W3C Compliant. Your WordPress theme may require some tweaking to be valid. One error I kept receiving was: Attribute "role" is not a valid attribute. Did you mean "frameborder" or "scrolling"? I will show you how to correct this error. Simply put, to correct the error we are [...]...
- WordPress Uploads Media to Wrong Directory Solution I recently built this site in a subdirectory in preparation for going live once everything was built and working appropriatly. After I launched the site and tried to add images to a new article Wordpress was still trying to upload the images to the old directory. Luckily, there is a very easy solution to this problem. Follow along [...]...







DLOCC Socials