echo children category with hyperlink
-
Hi everybody,
I am using a code that displays the (unique) children category (from a taxonomy) in my loop:
$terms = get_the_terms(get_the_ID(), 'taxonomy'); $slug= array(); foreach ($terms as $term) { if ($term->parent) $slug[] = $term->name; } echo '' . implode(', ', $slug);It works perfectly, but I’d like to have the sub-category with its hyperlink. Any help would be very much appreciated. Thank you very much!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘echo children category with hyperlink’ is closed to new replies.