Here’s a quickie for those of you who want to add a Google search box to your blog or website. It’s a lot easier than one would think. 😉
I finally got the right idea of what I was looking for after haggling with Google’s Ajax search API – if you want to have an almost fully functioning mini-Google on your site, definitely go ahead and install that. I will warn you though, it can get a bit confusing.
Instead of that, I finally found what I was looking for – a Google search box for my blog. This code is based on the code that is posted on Dave Taylor’s site; I’ve modified it to put the Google Search button on the bottom, after the option section, instead of between the search box and the options.
<center><form action="http://www.google.com/search" method="get">
value="" name="q" size="31" type="text"/><br/>
<input value="" name="sitesearch" type="radio"/>
value="YOUR BLOG ADDRESS" name="sitesearch" type="radio"/>YOUR BLOG'S NAME<br/>
<input value="Google Search" type="submit"/>
If you find that the search box doesn’t fit into your site’s style (i.e. it’s too wide, or too narrow) – just make the number in the size section (currently 31) larger or smaller, depending on your needs.
Save the changes, and you’re set with a Google search box on your blog! 😉