I am trying to use the Unlimited Sidebars feature to show different sidebars based on which category they are in - the feature requires that we check things off individually, making it very difficult for a large amount of posts.
I saw a tip on another thread and put this in the theme functions:
function add_tax_sidebar($sidebar){
if (is_category ('offshore')){
return 'ups-sidebar-offshore';
} elseif (is_category('taxation')){
return 'ups-sidebar-taxation';
}
else {
return 'ups-sidebar-main';
}
return $sidebar;
}
add_filter( 'ups_sidebar', 'add_tax_sidebar' );
So from what it looks like, it should show the “offshore” sidebar for the offshore category, “taxation” sidebar for the “taxation” category, and a default “main” sidebar for everything else. The function doesn’t break the theme but it seems to just show whatever “else” sidebar is listed, so I know it’s half working…how can I get this function to work?