vote up 0 vote down star

I am trying to pull in a styled sidebar specific to the category. I have the following code which works, but it is pulling in BOTH my new sidebar and the default. What am I doing wrong here?

From category.php

<?php get_sidebar();
if ( in_category('39') ) {
include(TEMPLATEPATH . '/sidebar2.php');

} else {
include(TEMPLATEPATH . '/sidebar.php');

}
?>
<?php get_footer(); ?>
flag

migrated to stackoverflow.com by Gnoupi, Diago Jan 15 at 19:14

This question is software development or programming related, and is a better fit for Stack Overflow.

Browse other questions tagged or ask your own question.