A
A
Alexander Tokmakov2019-12-06 16:21:36
WordPress
Alexander Tokmakov, 2019-12-06 16:21:36

How to make product categories open by default in woocommerce widget?

Now product categories are displayed like this:
5dea55c00aa85522120040.png
A should be opened immediately:
5dea55d31fcde638773768.png
I can't find a solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ADvi, 2019-12-06
@ADvi

Add, for example, a script that will set the .active class (as is usually the case in this kind of widget). It's hard to guess without a link.

jQuery(document).ready(function() {
    jQuery(".widget_product_categories .cat-parent.has-child").addClass("active");
});

Classes, of course, may differ for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question