Home › Forums › Back End › Conditional statement on category.php › Reply To: Conditional statement on category.php
December 14, 2015 at 8:35 am
#235834
Participant
That works, but I would like the child category to apply as well.
Tried a number of things like this, doesn’t work…
<?php $category = single_cat_title('', false);
$parentcategory = get_category_parents('', false);
if ( $category == 'pga' || $parentcategory == 'pga') {
echo 'pga cat';
}
?>