Can someone tell me what is wrong with this code?
-
<?php if (post_is_in_descendant_category(17)) {foreach((get_the_category()) as $childcat) if (cat_is_ancestor_of(17, $childcat)) echo $childcat->cat_name; } else echo "-";?>
This code works and produces no error but apparently I am wondering why there is a } but without a {. I tried to remove the } but it produces error instead. Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can someone tell me what is wrong with this code?’ is closed to new replies.