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.
Thanks. I missed that slightly strange coding in the get_sidebar docs. Funny because in the rest of the sidebar related files, you would use just “category-sidebar”, ie. in dynamic_sidebar(category-sidebar)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘[Resolved] Baffling category-specific sidebar problem’ is closed to new replies.