Multiple Sidebars
-
I am running into a “Call to undefined function” error when I try to instantiate two sidebars on my site.
the following code is my registration of both sidebars in my functions.php:
if ( function_exists(‘register_sidebar’) ) {
register_sidebar(array(
‘name’ => ‘main_sidebar’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2>’,
‘after_title’ => ‘</h2>’
));
register_sidebar(array(
‘name’ => ‘home_sidebar’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2>’,
‘after_title’ => ‘</h2>’
));I also have two corresponding PHP files with the following code (tailored to each file):
<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘main_sidebar’) ) : ?>
<?php endif; ?>Does anyone know why I am getting the fatal call to undefined function message?
Thanks,
Chris
- The topic ‘Multiple Sidebars’ is closed to new replies.