
With newer versions of WordPress being released with widgets, it is no longer necessary to download widgets from Automattic and install the plugin on your current Wordpress install. Modern versions of WordPress already come widgets ready. However, there are some situations where you find a WordPress theme that you really like, but soon discover that its not widgets ready. This article will teach you how to Wigetize a WordPress theme so that you can enjoy all the neat and robust features includes with Wordpress widgets.
You will know fairly quickly if your current theme isn’t widgets ready. You will see a screen like this:

Your screen will say, “No Sidebars Defined”. It will prompt you to visit a site called Automattic for instructions on how to widgetize your WordPress theme. Don’t worry, making a WordPress theme widgets ready isn’t difficult at all. I would recommend that you make a back up of your current theme before you do any modifications to the files within. Below are some easy and simple to follow instructions that will help you make your current WordPress theme widgets ready.
If you want detailed instructions on how to do this, I would visit the site titled Automattic. However, their page tend to make a mountain out of a mole hill. The hard part of widgets has already been done. With WordPress adopting the technology and including widgets into their program, widgeting themes couldn’t be any easier.
<?php
if ( function_exists(’register_sidebar’) )
register_sidebar();
?>and…
<?php if ( !function_exists(’dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
is the magic code that transforms your boring and featureless theme into something fun, exciting and packed full of options. It really doesn’t get much easier. Here are the steps to wigetizing your current WordPress theme.
<?php
if ( function_exists(’register_sidebar’) )
register_sidebar();
?>
<?php if ( !function_exists(’dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
<?php endif; ?>
That is it! Pretty simple? More to come. In a future article I will show you how to widgetize multiple areas of your current theme. Perhaps you have two sidebars, maybe you want to widgetize your footer or even your header. Any section of your blog can become widgetized. It’s just a matter of adding the right code in the right spot. Keep an eye out for some more posts about widgetizing other areas of your WordPress theme in the near future.

Have you thought about starting your own blog? My blog uses a program called WordPress. If you would like to start a blog just like mine, I'll be happy to help you set one up. I provide my readers, such as yourself, with a Free Blog Starter Kit. With this kit, you get everything you need to get your own professional blog up and running. I help you set up your web server, install WordPress, provide you with a free consultation to discuss what you want to blog about and I even make sure that your blog is search engine friendly.
Seriously? Do you really like to read this garbage? Subscribe to my blog.
My blog looks awesome on a mobile phone! Read my blog at work, just try not to laugh too hard or the boss will get pissed!
Also Try Searching:
Date/Time: 9-5-2007 04:37:15 Comment #4780
Great article! Thank you! Time to time I really was in this situation - found nice theme but didn’t used it because it was not widgetized…
Date/Time: 9-5-2007 15:16:05 Comment #4783
I am glad it helped. The process overall is really pretty simple. And with WordPress already having widgets migrated in, more than half the battle is over.
Date/Time: 6-3-2008 18:01:46 Comment #14941
YOU ARE MY NEW FAVORITE PERSON!! I spent hours tweaking a theme that was supposed to be widget ready for a lady only to find out that it wasn’t when I got done with the design work… I thought I was going to have to go through and do it all over again when I came across your blog… in 5 minutes I was able to save myself hours!! Thank-You so much!!!
Date/Time: 9-6-2007 09:00:17 Comment #4794
Hi Gary,
I was happy to find your site. You made widgitizing the ocean mist theme so easy. Unfortunately, I have no functions.php file.
Here are the files I have:
Stylesheet
Main Index Template
Header
Search Results
Sidebar
Archives
searchform.php
Single Post
Comments
Page Template
404 Template
Footer
and index.php
Is there any way to follow your directions without a functions.php file?
Thanks,
Brian
Date/Time: 9-6-2007 21:50:15 Comment #4799
Great article, I just Dugg it: http://digg.com/design/How_To_Wigetize_A_WordPress_Theme
Date/Time: 9-18-2007 17:52:09 Comment #5107
I’m with Brian, same files no function.php
Date/Time: 9-19-2007 05:11:53 Comment #5116
Brian…you need to create your own in the same directory as where your sidebar.php file is located. Just create the file and post in the necessary details.
Date/Time: 9-22-2007 06:11:21 Comment #5176
Thank you so much. After hours of diligent surfing, I found the perfect theme.
After it was installed I realized it was not widget ready. Now it will be.
THANK YOU! THANK YOU! THANK YOU!
Date/Time: 9-28-2007 09:24:41 Comment #5368
Doesn’t work. I followed your instructions step by step but still get the same message as your top screenshot.
Date/Time: 10-2-2007 12:00:30 Comment #5457
You are the best. I can’t tell you how many confusing articles I tried before I found this one. I’m in the same boat as Brennan -finally i found MY theme and not widgitized. Bummer. I am new to all this but you have given the courage to keep trying. Thanks again, and have a wonderful day.
Date/Time: 10-20-2007 15:57:22 Comment #5938
All right, I ran into troubles too.
I adjusted the sidebar.php file per instructions.
Having no functions.php file, I created one and pasted in your code.
After doing this, my blog simply came up with an empty page. No content.
Clearly we’re missing something here.
Does anyone want to assist me?
Peace,
Gene
Date/Time: 1-3-2008 06:43:25 Comment #8309
I get this error:
Parse error: syntax error, unexpected $end in /home/nouk/public_html/wp/wp-content/themes/PFM/sidebar.php on line 82
What shall I do?
Thanks,
Nouk
Date/Time: 1-16-2008 14:56:06 Comment #9104
Nouk - just had the same problem. You probably left out the at the end of the sidebar file. At least, that’s what I did!
Date/Time: 2-27-2008 03:11:22 Comment #11941
Thanks Gary for this useful tutorial :). Really helpful to me, since I’ve a project that need to be widgetized. Thanks …
Date/Time: 6-9-2008 20:09:23 Comment #15304
Hi Gene Steinberg
I had the same problem but I was fixed when I put the code all in one line. so I looked like this:
Date/Time: 8-22-2008 12:38:46 Comment #19124
what plugin are you using to rate your posts? i’ve been looking for one forever.
Date/Time: 8-30-2008 21:08:11 Comment #20219
Hi Garry,
Thanks for your great article. It works!!
I will copy this article to my blog and translate to my language.
THANKS MAN!
@Gene Steinberg
I got same problem, my blog simply came up with an empty page. No content.
I’ve fixed it.
When we copied scripts above and pasted it,
will automatically changed to
(’register_sidebar’) will automatically changed to (.register_sidebar.)
you must change the dot “.” to “‘”
this happen too for this script
Hope this fixed your problem.
Check out bod’s last blog post..Ganti IP Address di Plesk Database