Widgetised Sidebar
You may or may not have noticed the Widgets section of your WordPress dashboard and you may have wondered what they do and how to work them. They’re in fact very easy to use and enable you to move content around your sidebar very easily
1. First of all you need to create a sidebar.php file for your theme if you haven’t got one already. Delete all the code in it if you have one (if it has all your sidebar content copy and paste it to a safe place for later). Then paste the code below into it.
<div id="sidebar">
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
<?php endif; ?>
</div>
2.Next we need to create a functions.php file. Paste in the code below. You can edit the h2 and use whatever you would like
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
?>
3. You will need to call your sidebar so go to your header.php file and add
<?php get_sidebar(); ?>
at the bottom to call your sidebar.
4. You can now add widgets to your theme by going to Appearance >> Widgets On the right hand side you should have a column that says Sidebar1 and it should be blank.
You will probably only need to use the text widget, which you can use by dragging it across to the sidebar and adding your content, then clicking save.
5. You can move widgets around by clicking them and dragging them to wherever you would like them.
If you want to include php code in your widgets then you will need another widget called the Samsarin PHP Widget which you can download here.






