There is one parental taxonomy, and three children. How to display parental taxonomy on child pages?
1 answer
If only the name - then something like this:
echo get_term_by('id',get_queried_object()->parent,get_queried_object()->taxonomy)->name ; More about get_term_by https://wp-kama.ru/function/get_term_by ; get_queried_object https://wp-kama.ru/function/get_queried_object
- Thank you very much) - Nick
|