43 A search widget for your blog
July 30, 2007 /

Over at Beautiful Beta, I found a wonderfully simple search widget which operates in a similar way to the "Search this blog" feature found in the navbar. You can easily implement this widget into your blog by using the widget installer below:

Install Blog search widget

This form will take you to Blogger where you can choose to install the search widget into your sidebar (or other element of your template). However, if you prefer to install the search widget manually, you should take the following steps:
  1. Go to Template>Layout in your Blogger Dashboard.
  2. Create a new HTML/Javascript element in your sidebar.
  3. Insert the following code into the widget:
    <p align="center"><form id="searchthis" action="/search" style="display:inline;" method="get"> <input id="search-box" name="q" size="25" type="text"/> <input id="search-btn" value="Search" type="submit"/> </form></p>
  4. Give your widget a title if you like (eg: "Search this Blog"), and click save. You should now have a fully functional search box in your blog's sidebar!

So, if you prefer something simpler than the Google blog search I wrote about before, this is surely the widget for you.

Technorati Tags: | | | |

43 Comments:

1 August 2007 16:21 Ankit Duseja said...

This hack was previously written on Digital Technology (http://dt.yogtec.com). If you have copied the code from there please mention a backlink to the particular post from where you copied.

1 August 2007 16:42 Amanda said...

Hello Ankit,

I actually got the code from Beautiful Beta (as referenced in my post) who wrote about this last year, and states that he got the code from Phydeaux.

Your blog features some great tips and tricks, so if ever I reference your posts I will be sure to post a backlink and proper credit as with other posts I have written.

19 March 2008 23:35 Googe said...

how can i make this work for a non-custom blogger hosted site

that is, how can i put this code on my indierockcafe.com website which does NOT use Blogpost or allow for Layout customization?

Thanks! Good site

9 April 2008 01:39 Jeeberman said...

Amanda,
How do you get your search results within your blog to only have the post titles appear like beautifulbeta?
Please Let me know, if you have any ideas. You can contact me at http://kontactr.com/user/bestwidgets

My site http://widgetsforfree.blogspot.com

10 April 2008 23:48 Amanda said...

Hello Jeeberman,

I remember coming across this hack a while back but can't remember how to implement it offhand.

When I find this again I will update with a link back to the resource for you.

Hope this will help!

Best wishes,

Amanda

12 April 2008 19:17 jeeberman said...

Amanda,
thanks a lot for responding so soon.
Best luck on finding the resource.

thanks,
-John

9 May 2008 05:41 Jeeberman said...

Hey check out my site: http://widgetsforfree.blogspot.com

I got the hack to work!

14 June 2008 05:24 . brenda . said...

Great!!!!! So happy to find the perfect search feature I could use. Thanks!!

11 July 2008 15:26
Anonymous said...

I inserted the code and it only searched the "search" category on my blog.

19 July 2008 21:28
Nate said...

Is there a way to right-align the search bar? I would like it flush with the right margin of my sidebar.

I took a guess that changing the part from "center" to "right" might do it, but no luck.

6 August 2008 09:56 TRESTIN MEACHAM said...

I was planning to add a search bar later, but this was so simple and easy. I checked it it works well and fits my blogs templat well.

15 September 2008 12:01
didi said...

Cheers mate :D

14 October 2008 03:52 kannadiga said...

Thanks for your widget!!
i have used it on www.sirigandha.com

26 October 2008 01:49 Nima AliBeiglou said...

WOW! Thanks a lot, I really need it. I will use it in my blog after changing its design on November 1st :)

1 November 2008 23:28 Anne said...

Brilliant thanks

8 November 2008 05:46 TIB said...

Thanks.
It was of great help

26 November 2008 22:15 Matt said...

Perfect...exactly what I was looking for (and I've tried a whole bunch I didn't like before this one!). Cheers!

17 December 2008 16:44 universomethodic said...

that is exactly what I was looking for

Thnaks from Brazil my friend

28 December 2008 08:25 Che_3z said...

Wow..Thanks for u widget..:D

4 January 2009 18:45 Paolo Sacco said...

Simply great!
I was missing that tool, and now.. Here it is!

11 January 2009 09:39 HD Wallpapers said...

I love this search widget.. this one is grt.. Searches within the site.. and easy.. .thanks!!
i used the same for my site.. http://freehdwallpapers.co.cc

26 January 2009 19:26 tiago said...

Muchos gracias! Really came in handy for me :)

7 February 2009 09:50 Sandhu Singh Navjeet said...

Thanks for it but it's appearing on the left side of my blog header. You can check it How to put in on the extreme right?

Please tell.

24 March 2009 16:37 Brown Skin said...

thanks a lot!!

29 March 2009 02:01 The One said...

thanks !!

http://www.mediafirefilms.com/

1 April 2009 14:21 gonkyouka said...

as the guy above said.. how can we align this search bar on the right?

27 May 2009 19:06 Softpump said...

your widget is greates ever..............

4 June 2009 17:20 SASI said...

IF U NEED TO END MONEY BY BLOGGING AND BECOMING A CO-AUTHOR FOR A SITE PLEASE MAIL ME AT SASI.BVB@GMAIL.COM]

THIS IS NOT A SPAM YAAR

13 October 2009 18:01 3hirty6ix said...

Good Post Keep it up

16 January 2010 07:43 Chandra said...

Very Nice Widget. I installed this widget in my blog foote column and header.You can visit my blog
http://freecomputercourses.blogspot.com

5 March 2010 06:56 Abhiseqa said...

this is very helpfull...
thanks alot..

6 March 2010 02:07 Alex said...

search function dosent work on http://www.rowallpapers.com for older posts, anyone know why?

19 March 2010 03:22
chickenundead said...

Cool,
it works!!

27 April 2010 12:10 web hosting said...

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

21 May 2010 11:04 Jc said...

Hope this works

10 June 2010 06:20 Rahul Singh said...

You can get better Search form for blogger from: http://www.rajeshpatel.net/how-to-add-search-form-to-blogger/

11 June 2010 22:41 Kelly said...

Let me try first.!

Post a Comment

Browse through the Archives

All existing posts are still available to view while I'm working on the site, albeit seen in a much simpler interface. Feel free to browse through the archives to find tutorials, templates and articles to help you build a better blog:

Blog Archive

© Blogger Buster 2010 Home | About | Contact | Hire Me