admin管理员组

文章数量:1415636

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

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

Share Improve this question edited Aug 14, 2019 at 9:38 nmr 4,5672 gold badges17 silver badges25 bronze badges asked Aug 14, 2019 at 8:36 Phi CaoPhi Cao 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 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

本文标签: categoriesWoocommerce category show subcategories onlyomit posts for specific category