I want to echo my hierarchical taxonomies parents which i used in my posts.
I've see answers about that, but no one didn't help me.
Now i using <?php the_terms( $post->ID, 'mytaxname', '', ' / ', ' ' ); ?> to get all taxonomies. But i want to get only parents of used tax's.
But i need simplest answer, because i'm not good at PHP.
Hope to get answer. Thanks a lot.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
Try this:
You have to get the current term slug and then use get_term by the slug and then echo the name. |
|||||||||||
|