hello folks,
i know, with if(is_category) i can have a different sidebar for every category, page (..), but i want to realize that with the php-switch()... is that possible? as a php-learning-noob i tried it, but didnt know how to handle that ..
any tips here?
thanks.
I'm no hero at PHP, but maybe you could use something like this, to avoid a long winding list of if statements:
<? php get_the_category()) as $cat ?>
<?php include('sidebar' . $cat->cat_ID . '.php'); ?>
If not, I'm sure you could use the category ID some way.
See the Category id