Add filter to wp_list_categories and query what type of taxonomy-terms it use?

WordPress do:

apply_filters( 'wp_list_categories', $output, $args );

You can do:

function add_slug_css_list_categories($list,$args) { }

Then you can use $args to determine what kind of list you have.

Not sure if you must do that but when you add the filter there is also a variable for accepted arguments:

add_filter('wp_list_categories', 'add_slug_css_list_categories',10,2);

Leave a Comment