DokiDoki069
Member
Posted 2 years ago #
Hi, I'd need some help, I tried to follow online tutorials on how to change my header for each category but it seems that my files are slightly different (custom template) and I end up getting lost (I'm a newbie for everything that concerns php etc)
is anyone offering some wordpress service or could help me to figure out how to do it?
Thank you
Deckster0
Member
Posted 2 years ago #
The most basic solution would be:
<?php if(is_category(Specify category ID)) {?>
//Do stuff here...
<?php } else { ?>
//Do stuff here if visitor isn't viewing category X
<?php }?>
donwash
Member
Posted 2 years ago #
I just put that stuff in my archive.php. Unfortunately it does not work within the single.php. Are there any improvements i can make?
PhilGarrett
Member
Posted 2 years ago #
for a single post you need to use in_category instead of is_category
donwash
Member
Posted 2 years ago #