Hi
I have some static widgets in the sidebar.php, and a widget in the dynamic sidebar. I want to hide the dynamic sidebar if the post is in the category "artists". Does the following code not work as it's not in the loop?
<?php if (in_category('Artists')) { ?>
No dynamic sidebar shown.
<?php }else{ ?>
<?php /* Widgetized sidebar, if you have the plugin installed. */
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?><?php endif; ?>
<?php } ?>
The above code has been put in the sidebar.php.
What's wrong?
Thanks in advance,
Kenneth