How to display only one category using the_category()?
-
Hi,
Let’s say I have a post that in the “Subcategory” category which is a child of “Main” category. Using
the_category(' ', multiple, $post_id)
in the loop I get something like:
Main Subcategory Main
Is there a way to only display child category that this post belongs to? I would like to have only
Subcategory
link, without the double “Main” stuff.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to display only one category using the_category()?’ is closed to new replies.