Woocommerce category show subcategories only/omit posts for specific category

by Phi Cao   Last Updated August 14, 2019 09:08 AM

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 .subcategories-div {display:block} .products-div {display:none}

But then obviously, not do it via css.

Thanks



Answers 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

dado
dado
August 14, 2019 08:55 AM

Related Questions



How to order categories?

Updated July 15, 2015 13:03 PM

Display All Products by Category with WooCommerce

Updated June 04, 2015 08:03 AM

custome woocommerce category page

Updated February 16, 2016 16:03 PM

woocommerce custome category page with pagining

Updated February 24, 2016 04:03 AM