Answer the question
In order to leave comments, you need to log in
How to display the name of only child categories in WordPress?
It is necessary that the title and link be displayed only to the child category in which the post is located. That is, all posts are by default in the parent heading "News", but each separately belongs to other child headings, for example, "travel", "sports", etc. And so it is necessary that in the list of headings of the post only child "adventure" is displayed, but without the parent.
Answer the question
In order to leave comments, you need to log in
You can also try:
<?php
$catsy = get_the_category();
$myCat = $catsy->cat_ID;
wp_list_categories('orderby=id&child_of='.$myCat);
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question