I’m in need to know if the current taxonomy is child or parent. How can i achieve this?
I need it for the condition in if statement. I need to know
if(this is child taxonomy){
}
Anybody knows how?
I’m in need to know if the current taxonomy is child or parent. How can i achieve this?
I need it for the condition in if statement. I need to know
if(this is child taxonomy){
}
Anybody knows how?
Comments are closed.
You may be using this piece of code, found in the WordPress support articles and which you can see here.
Use
get_ancestors()
.