hide all woocommerce products from Shop page display
-
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?Thank you in advance!
- The topic ‘hide all woocommerce products from Shop page display’ is closed to new replies.