• Resolved rwwood

    (@rwwood)


    I have the following in functions.php,:

    register_sidebar(array(
    	'name'=>'sidebar',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="widgettitle">',
        'after_title' => '</h2>',
    ));
    register_sidebar(array(
    	'name'=>'category-sidebar',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="widgettitle">',
        'after_title' => '</h2>',
    ));

    I have the following in category-sidebar.php,:
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('category-sidebar') ) : ?>

    and I have the following in category.php.:`
    <?php get_sidebar(‘category-sidebar’); ?>`

    Both “sidebar” and “category-sidebar” show up in the admin interface and I can add different widgets to each one. Nevertheless, when category.php is called, the default sidebar (sidebar.php) is loaded, not category-sidebar.php. I’ve searched the forums and everything I have seems to be correct, but I still get the wrong sidebar for the category template.

    Any help would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Baffling category-specific sidebar problem’ is closed to new replies.