Todays post is sponsored by: Web Inspiration.
To create a theme (since version 2.2) is to make the theme widget enabled, so this is how you do one.
In order to make a theme widgetized, we have to do this. Open sidebar.php and add this:
<?php /* Widgetized sidebar. */
if ( !function_exists(’dynamic_sidebar’) || !dynamic_sidebar() ) : ?>// Sidebar content here.
<?php endif; ?>
Thats all there is to it!
3 Responses for "Widgetize your theme."
Hi,
Don’t forget the code block that needs to be added into functions.php:
Without that you won’t be able to adjust the widgets in the admin panel.
I do not undestand, this article is for wordpress right?
Hi Stuart,
Yes, this code if for wordpress. This post is aimed at developers wanting to add the ‘drag and drop’ feature in the admin panel so blog owners can easily add sidebar components.
Leave a reply
You must be logged in to post a comment.