Cannot Register Multiple Sidebars
-
WordPress 2.9
GoDaddy Hosting
PHP5I’m building a new theme and need multiple widgetized sidebars. So I added this code to the functions.php file:
<?php
if ( function_exists(‘register_sidebar’) )
register_sidebar(array(
‘name’ => ‘Sidebar Mack’,
‘before_widget’ => ‘<div id=”%1$s” class=”mack”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));if ( function_exists(‘register_sidebar’) )
register_sidebar(array(
‘name’ => ‘Sidebar Biz’,
‘before_widget’ => ‘<div id=”%1$s” class=”biz”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));if ( function_exists(‘register_sidebar’) )
register_sidebar(array(
‘name’=>’Main Sidebar’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h4>’,
‘after_title’ => ‘</h4>’,
));?>
All 3 sidebars come up in the admin section so I can add widgets to them but only the first registered sidebar displays on the website. (NOT a styling issue, viewed source code of a page and there is only the first sidebar showing up) I’ve used this code before and it worked fine before…
- The topic ‘Cannot Register Multiple Sidebars’ is closed to new replies.