Isolate parent and child terms

Question

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.

0
, , Young Grashopper 1 month 0 Answers 23 views 0

Leave an answer