1

I have a woocommerce shop with 2000+ products. I have set the shop catalog to show subcategories AND products. However, there are some categories that are so vague that there is no need to show any products until customer narrows filter.

I would therefore like to omit products from said pages to help with page load speed and customer confusion.

Something like.

If category id = 123
echo
<style>
.subcategories-div {display:block}
.products-div {display:none}
</style>

But then obviously, not do it via css.

Thanks

1

Maybe you want to try adding products to subcategory, but not showing them on main categories. Then when user filters and goes to subc, you show products.

Link

  • hi, this does not work for me. This omits products in general if they are part of a child category. This is not what I am looking for. – Phi Cao Aug 14 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.