Answer the question
In order to leave comments, you need to log in
How to make subcategories dropdown list in Woocommerce?
In general, on my wordpress site, I made the output of categories and subcategories in my sidebar and was able to make the subcategories drop-down list. Here is the site itself , click on the link "electrical cabinets" - there will be a toggle effect on the subcategories.
Here is the JS code:
$(function() {
$('.product-categories .cat-parent').children('a').click(function() {
$(this).siblings('.children').slideToggle();
return false;
});
});
ul.children{
display: none;
}
<span><i class="fa fa-angle-down" aria-hidden="true"></i></span>
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