Isolate parent and child terms


Is there a simple way to get the parent and child terms isolated in a variable on a custom post?

Right now the taxonomy hierarchy looks like:
– Country (parent)
– City (child)

What I want is to get the parent term in a $parent and child in $child variable.


>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="">

Isolate parent and child terms</a>
, , Young Grashopper 9 months 0 Answers 45 views 0

Leave an answer