I would like to add more than one sidebar. I have my functions.php script to register 4 sidebars:
PHP Code:
<?php
<code></code>if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'sidebar1',
'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
'after_widget' => '</div>', // Removes </li>
'before_title' => '<h3>', // Replaces <h2>
'after_title' => '</h3>', // Replaces </h2>
));
register_sidebar(array('name'=>'sidebar2',
'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
'after_widget' => '</div>', // Removes </li>
'before_title' => '<h3>', // Replaces <h2>
'after_title' => '</h3>', // Replaces </h2>
));
register_sidebar(array('name'=>'sidebar3',
'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
'after_widget' => '</div>', // Removes </li>
'before_title' => '<h3>', // Replaces <h2>
'after_title' => '</h3>', // Replaces </h2>
));
register_sidebar(array('name'=>'sidebar4',
'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
'after_widget' => '</div>', // Removes </li>
'before_title' => '<h3>', // Replaces <h2>
'after_title' => '</h3>', // Replaces </h2>
));
?>
My sidebar.php script is set for 4 sidebars as well:
PHP Code:
<?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; ?>
I have my sidebars set in the right place. I placed my
PHP Code:
<?php get_sidebar(); ?>
in the right places. However when I go to place the 4 widgets all 4 widgets only appear in the first sidebar while the other sidebars remain blank. Any ideas?