Filing Cabinet - woman putting back an importa...


What about if you want to edit stuff on other locations of your website directly from the admin panel ? For example a portion of your header or footer, or you just simply want to add another sidebar.

It is simple, in the template file you want to add a section where you will drag and drop widgets, use the following code:

<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘sidebar1’) ) : ?>
<?php endif; ?>

You’re not done yet. Now you have to register the sidebar.  We called the sidebar “sidebar1”.

Open functions.php file and then paste the following code:

if ( function_exists(‘register_sidebar’) )
‘before_widget’ => ‘<li id=”%1$s” class=”sidebaritem”>’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h2 class=”widgettitle”>’,
‘after_title’ => ‘</h2>’,

Now you’re done. It is still called sidebar, but you can use it on your header, footer or homepage.