Monday, March 19, 2007

Add search box to new blogger

Blogger have a build in search box in the top navigation bar, but that search box searches all blog on blogger. You can include a similar search box on your blog template, to give your readers a chance to search your blog. The advantage by adding this search box is that the result is showed in the main body of your Blog unlike the search box in the top navigation bar.

How to add the search box

The easiest way to add the search box is under Template chooses where you would like the search box to be placed and click "Add a Page Element". Select "HTML/JavaScript".

Add the following code, but before you add it you have to change some parts of it to make it work:


<p align="left">
<form id="searchthis" action="BLOG-URL/search" style="display:inline;" method="get">
<strong>SEARCH HERE<br/></strong>
<input id="b-query" maxlength="255" name="q" size="20" type="text"/>
<input id="b-searchbtn" value="Search" type="submit"/>
</form></p>


It is importen that you change BLOG-URL to the URL or web address of your Blog. You can also change the text in top of your search box by changing SEARCH HERE to your Blog-url or what you like.

Now you only need to save and refresh you blog to see the result. Now you can see a search box like the one below. You can change the length of the search box by changing "20" to another integer. A lower number will result in a short search box and a higher in a longer search box. You can always try to change to get the search box to fit you blog layout.


Search here



By adding the search box to you blog you give the readers a better change to find more information on your blog and thereby get them to stay longer at your blog. You may also have the readers come again because you give them a good opportunity to find the information they are looking for.

2 comments:

Anonymous said...

Where do you see the ADD ELEMENT option? I don't see it under templates for my new blogger account.

ttander said...

You can find more information her:
Layout Guide

Hope you can use the information