Customizable Search Widget

  Customizable Search Widget (3.8 KiB, 6,232 hits)

Well, this is my first WordPress Widget that I have created. After delving into creating and modifying plugins, I decided to take a shot at Widgets.

I didn’t really think the Search Widget integrated with WordPress was really adequate. I wanted to be able to have some other options in how the Search box was displayed. So I created this widget to do just that!

Here is a screenshot of the backend:

You can see the working product on the site currently.

If you have found this widget useful, please consider donating to the poor post-college graduate that I am by clicking on the big yellow Donate button.

=== Customizable Search Widget ===
Author: Brian D. Goad (bbbco)
Plugin URI:
Tags: widget, search, customize, customizable, image, text
Requires at least: 2.2
Tested up to: 2.7
Stable tag: 1.2.5

=== Description ===
Adds a Customizable Search Widget to give you more control over how the search box looks on your sidebar.

=== Installation ===
Extract the zipped file and copy the `customizable-search-widget.php` file to your plugins directory. Then activate the Customizable Search Widget from WordPress, and get busy making your sidebar look even more snazy with an awesome search bar!

=== Frequently Asked Questions ===
Can I Use a Graphic Instead of a Standard Button?
|-> Yes, you can input the path to an image located in your current theme’s folder. This is located in the Admin panel.

Can I Change What the Button Says?
|-> Yes, you can customize this in the Admin panel.

Can I Modify How the Textbox and Button Look?
|-> Yes, you can input a custom defined class, id, or style for both the textbox and button in the Admin panel. Check out my tutorial on Stylizing Modifications for more information.

[Ask a question] mailto: bdgoad (at) gmail (dot) com

=== Future Plans ===
* Include options to not require a search button
* Hmmm

=== Version History ===

= Version 1.2.5 =
* Naming typo (how did that get spelled “buttton”?) caused button not to save correctly

= Version 1.2.4 =
* Bug fixed to show correct button type

= Version 1.2.3 =
* Revert back to function (wp_specialchars_decode only in 2.7.1)

= Version 1.2.2 =
* Use different function because of WP 2.7.1 error (ticket #9090)

= Version 1.2.1 =
* Included corrected functionality for users of PHP4

= Version 1.2 =
* Slight change to detect “id=” and “style=” tags in text modifier and overide standard formating with custom user formating.
* Check to ensure path to images has beginning “/”

= Version 1.1 =

* Corrected Other Modifying Attributes to work correctly with both browser and widget backend

= Version 1.0 =
* Initial work onthe widget

== Download Now! ==

*Version 1.2.4

  Customizable Search Widget (3.8 KiB, 6,232 hits)

28 Responses »

  1. I was just searching for this type of plugin the other day, to no avail. Found you on Weblog Tools Collection today! Thanks very much. Nice work on this theme too, by the way.

  2. […] Customizable Search Widget […]

  3. Customizable Search Widget…

    Adds a Customizable Search Widget to give you more control over how the search box looks on your sidebar….

  4. I have been looking for a way to customize the look of my search box. I tried your widget and it gives me a fatal error. Unfortunately the error message happens on the wordpress 2.7 widget screen after adding and then saving. The error message is off the screen and I can’t capture it for you to look at.

  5. Nice looking widget, but Ill wait to try it out until I hear that it is fixed for version 2.7, after reading Steve’s comment.

  6. @steve and jesse

    The widget is working fine in 2.7, which is currently installed on this blog and my sandbox. The widget is currently working fine on both as well.

    Steve: is there any other indications you can share with me as to what makes the widget not work? Are you using PHP5?

    Jesse: why not give it a shot for yourself to see if it works for you. Just because one person reported an incident, why do you think its automatically broke? Sounds like an isolated incident. Plus, if it doesn’t work for you, I need to know more info in order to fix it, and would love if you could provide it.

  7. Hey there,

    I’m getting the error as well. It’s:
    Fatal error: Call to undefined function: htmlspecialchars_decode()
    customizable-seach-widget.php on line 129

    It takes out the whole widget user panel and sidebar.

    Hope this helps.

  8. Me too! WP 2.7.1
    It looks like this…

    Warning: htmlspecialchars_decode() expects parameter 1 to be string, NULL given in /nfs/c01/h02/mnt/33041/domains/ on line 105

  9. Yeah I’m getting some weird behavior in 2.6.5 too. I installed it, then add the widget to the sidebar, configured and saved it. And it seems to work. But then when I go back to try and edit it, there are some weird characters instead of the blue bar with the edit link on it. I can send a screen shot if you like to see more specifically what I’m talking about.

  10. Yes please, send a screenshot with any errors or unusual behaviors you experience.

  11. hi,

    can someone help me with the code to make the button carry the german “suche starten …” in bold helvetica ? Thanks!

  12. Well, now I’m not have the same trouble I was having before on the widget page, but I’m getting the following text underneath the search box and buttons on my home page. I’m using wp 2.7.1

    Warning: htmlspecialchars_decode() expects parameter 1 to be string, NULL given in /mnt/data/jakelondon/ on line 105

  13. Please see my most recent post about this error.

  14. […] Customizable Search Widget (1.2.1) […]

  15. Hi there,

    really nice plugin!
    Could you please make a litte modification in order to be xhtml compliant?
    after a table must not be a td but first a tr element.
    And valign is not allowed; It has to be set by css style.


  16. […] Customizable Search Widget (1.2.2) […]

  17. Thanks
    Very helpful for me.

  18. I can’t figure out how to write the path so it uses an image. Could you give an example?

    Also, any way to comment out the code so that it removes the Title?

    Thanks! Simple is the way to go.

  19. Hi, I just added this to my blog and it works for the most part. But I can’t get my own image to come up. Can you provide a sample of the text that should go in the path field? Hopefully, that’ll help me figure out what I’m doing wrong. Thank you!

  20. Hi Brian,

    Just what I was looking for and perfectly working in WP2.9

  21. I don’t want a title, but it won’t let me leave that field blank, it keeps putting “search” in there no matter what I do. It adds it when I save. Let me know if you get a fix for this…it’s all that’s stopping me from getting my search button to look the way I want it to.

  22. i tried putting just a space in, that helps, but the background styling for my widget titles shows up. Possibly I can do some custom css to lose the background on this one widget title, once I figure out how to I.D. it. It’s frustrating, though. A title should not be necessary.

  23. I would suggest giving the custom field modifier text box an I’d and then using css to do a display: none

  24. so good, it is exactly what i need 🙂
    but please help me about image button!
    space between button and text field seems too long! how can i change it?

  25. […] Customizable Search Widget: That is what you see over on the right hand side. This allows me to change the look of the search box a bit. […]

  26. is this plugin still maintained as it look great

  27. Hi,

    I installed the plugin from the time I launched my website, However, as far as I can remember it was working well, particularly on the accuracy of the search results. When I upgraded to Version 1.2.5 (the current version), the search results is no longer that accurate compared before.

    Any idea? I need your assistance.


  28. You really make it seem so easy with your presentation however I find this matter to
    be actually one thing that I believe I might never understand.
    It sort of feels too complex and extremely large for
    me. I am having a look ahead for your subsequent post, I
    will attempt to get the hold of it!

Leave a Reply