Answer the question
In order to leave comments, you need to log in
How to display hierarchically categories of custom taxonomy?
At the moment I'm using wp_list_categories
In general, everything suits, for 1 nuance. I would like to add my own classes for different levels of links and nested lists, since it is extremely inconvenient to make up now.
I would like to at least somehow separate links with the class "link_lvl1" at least.
How to do it?
Answer the question
In order to leave comments, you need to log in
First level:
ul.categories__list>li {}
Nested level:
ul.categories__list ul li {}
Is this the question?
wp_list_categories()
will give you a list with only its own, ready-made layout
You can use the filter wp_list_categories
to edit the output of the query layout or create your own query get_terms()
and write your layout the way you need
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question