Hide Woocommerce products based on specific categories
-
HI,
On the Shop page, I want to display only products under specific categories which I achieved by using the Woocommerce Gutenberg block called “Products by category”. This was a success.
The issue is that after this block, all products still show up in the shop page (including the ones filtered out using the “Products by Category” block, so that most products are shown twice (once in the “Products by Category” block and a second time because the Shop Page Display (located in the Customizing ? WooCommerce ? Product Catalog section) is the default in “Show Products”.My current theme is Generatepress but they offered only this response:
[We do not have control over Woocommerce’s template, we only control some of the styles. I would recommend reaching out to Wooocommerce’s support for this. If you do not need to remove them from HTML, we can use CSS to hide them.
.archive.post-type-archive-product div#wc-column-container { display: none; }
While hiding duplicate products with CSS fixes the visual issue, it can create accessibility and SEO problems, and doesn’t truly remove the content.]
Is this the best way to solve my problem? If so, can you please provide me with the step by step on how to achieve this efficiently?
It would be awesome if there was an option in the customizer (located in the Customizing ? WooCommerce ? Product Catalog section) that instead of “Show Products” would say “Hide Products”
Thank you in advance!
The page I need help with: [log in to see the link]
- The topic ‘Hide Woocommerce products based on specific categories’ is closed to new replies.