Answer the question
In order to leave comments, you need to log in
How to display a child element separately from the parent from a custom taxonomy?
Hello! Please tell me, here I have a custom taxonomy "vehicles" and in it the elements of the 3rd level of the hierarchy.
That is:
Parent > child > great-grandchild
And I have a lot of these 3-level hierarchies, and I have 377 elements in general. I'm not sure that I explain correctly and clearly, so here's a screenshot for clarity
. I have a task to display each level of the hierarchy separately on the product page.
That is, on the site it should look like this.
Year(Parent) - list with all years - separately
Make(Child) - list with all manufacturers - separately
Model(Great-grandchild) - List with all models - separately
How do I do this? It would not be very desirable to manually drive in the ID, let me remind you that there are 377 elements. What do you advise?
yes i can use
$args = array(
'title_li' => '',
'taxonomy' => 'vehicles',
'depth' => 1
);
wp_list_categories($args);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question