Highlight “Show all” item in wp_list_categories

I use wp_list_categories to display category filters on post archives.

I can use current_category param to set current category – and such item will get addition class current-cat. I can even omit this param – in such case the current category will come from get_queried_object().

But… I want to show “Show all” link in that navigation. All i have to do is to use show_option_all param.

And here’s my problem. How can I highlight this option, when no category is selected?

Read more here:: Highlight “Show all” item in wp_list_categories

Leave a Reply

Your email address will not be published. Required fields are marked *