Monday, April 21, 2008

How to Add a Blogger Search Box

This simple Blogger Tweak will enables you to add a blogger search box that will help your readers search for a certain topic on your blog.

The main advantage of using this kind of search box is that the results will display on the body of your blog not unlike Google's search box that will open another window for search results.





<p align="left">

<form id="searchthis" action="YOUR BLOG URL/search" style="display:inline;" method="get">

<strong>NAME OF YOUR BLOG<br/></strong>

<input id="b-query" maxlength="255" name="q" size="20" type="text"/>

<input id="b-searchbtn" value="Search" type="submit"/>

</form></p>



OUTPUT:






Remember to change YOUR BLOG URL to the URL or web address of your Blog. Also, change the NAME OF YOUR BLOG to that which you want to call your site. For instance, if your Blog Name is long, you may want to write something like “Search Here” or “Search this site”.

You can also change the “Search” button to say, “Hit” or “Go”, by changing the Value.

Save the code and refresh your page. If you want a longer or shorter search box, you can play around with the size.

If you change the width size="30" and value="Go" it will give you this


1 comments:

Unknown said...

Thanks! This is great. A lot of people comment on old posts and I have no idea how to find the specific post if the subject isn't one of my tags when I post the entry!

YAY! :-)