is_category in Sidebar.php
-
I am using a theme and want the sidebar to be different for a particular category , so rather than have 2 sidebar files , ie sidebar.php and sidebar2.php , i tried to use the “is_category(‘catname’)” function within the sidebar.php file
However I cannot get it to work even whan i put some simple code in it just doesnt seem to run, any ideas
I put the following code in the sidebar.php as a test
<?php if(is_category(‘blog’)) { echo “sss”; } ?>
it just doesnt work but if i put this code in Archive.php, it does work…
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘is_category in Sidebar.php’ is closed to new replies.