UPDATE: As wordpress does not show characters correctly, the codes below may not work. So please do copy the codes from this file I have uploaded. Please read the post as well as the instructions included in the file. You may need to use WinRAR or 7zip to extract the file if you are running Windows.
The theme I’m using in this blog is widget unaware Notepad-Chaos theme. However, I have managed to allow it to add widgets.
I created a new file named functions.php in the directory wp-content/themes/notepad-chaos and put in the following code:
<?php
if ( function_exists(‘register_sidebar’) )
register_sidebar(array(‘name’=>’sidebar1’,
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));
register_sidebar(array(‘name’=>’sidebar2’,
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));
register_sidebar(array(‘name’=>’sidebar3’,
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));
register_sidebar(array(‘name’=>’sidebar4’,
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));
register_sidebar(array(‘name’=>’sidebar5’,
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));
register_sidebar(array(‘name’=>’sidebar6’,
‘before_widget’ => ”,
‘after_widget’ => ”,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));
?>
So as to support a maximum of 6 widgets. Then, I opened up sidebar.php in the same directory and added in the following code at the end:
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar(‘sidebar1’) ) : ?>
<?php endif; ?>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar(‘sidebar2’) ) : ?>
<?php endif; ?>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar(‘sidebar3’) ) : ?>
<?php endif; ?>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar(‘sidebar4’) ) : ?>
<?php endif; ?>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar(‘sidebar5’) ) : ?>
<?php endif; ?>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar(‘sidebar6’) ) : ?>
<?php endif; ?>
so as to support a maximum of 6 widgets to the sidebar. You may choose to edit the template elsewhere to place the widget as you like. Remember the names though (sidebar1, sidebar2, sidebar3 etc.) as you will need to know where the widget you are adding will go.
Now go to http://yoursite/wp-admin/widgets.php and you should be able to add widgets you choose.
Have Fun!
References:
How to Widget-Enable WordPress Themes in 3 Easy Steps
Multiple Dynamic Sidebars in WordPress