Nov
22

A Duh! moment – better widgets

Web designers, WordPress  
Off

For a relatively intelligent person (qualified for Mensa, albeit before kids and other brain challenging occurences), I still have some of those duh! moments, where you realise something and wonder why you had not figured it out before?

I always knew that there was a lot that one could do with text widgets and the way that wordpress works, and yet I still found myself wishing that the search widget was different and not wanting to hard code the code in the theme, but have it work across themes etc etc etc….

And then the light bulb lit up:

For a cleaner leaner search widget that says “search”, not “find”, create a text widget and enter:

<form id="searchform" action="" method="get">
<input id="s" type="text" tabindex="1" size="16" value="" name="s"/>
<input id="searchsubmit" type="submit" tabindex="2" value="Search" name="searchsubmit"/>
</form>
search
Be Sociable, Share!

Related posts:

  1. Subscribe2 Widget Form – an alternate The wordpress subscribe 2 plugin is great – however the form in the widget bothers me. I have raised this ...
  2. Subscribe2 widget markup and css Please refer to updated instructions. The wordpress subscribe 2 plugin is great. Version 4.9 just released – a wonderful alternative...
Categories : Web designers, WordPress

WP Questions

Preferred Web Host

Web hosting by ICDSoft Icdsoft - Why? They are good and reasonable, used them since 2001. Read more