Tagged: x
-
AuthorPosts
-
December 5, 2016 at 11:07 am #1281820
sosmondParticipantIs there a way to hide products from a specific category from showing on the main shop cart page http://jeff-dillon.com/portfolio/ for example products in the category “people”
If someone selected the “people” category then they would see the products in the people category.
December 5, 2016 at 11:46 am #1281863
RupokMemberHi there,
You can do it with some CSS but it might cause unusual issue with the layout. Let’s try adding this under Custom > CSS in the Customizer.
.woocommerce ul.products > li.product_cat-people { display: none; }Hope this helps.
December 13, 2016 at 9:50 pm #1292224
sosmondParticipantThank you for this solution, it does do what is should but like you said it does leave a blank placeholder in the list where the item is not displayed.
Do you have any other ideas/methods of filtering out a category from the display?
December 14, 2016 at 1:37 am #1292371
Paul RModeratorHi,
You can try this code instead.
.post-type-archive-product.woocommerce li.product.first { clear: none; } .post-type-archive-product.woocommerce li.product { vertical-align: top; display: inline-block; float: none; } .post-type-archive-product.woocommerce li.product.last { margin-right: 2%; margin-left:2%; } .post-type-archive-product.woocommerce .cols-3 li.product { width: 28.3%; } .post-type-archive-product.woocommerce ul.products > li.product_cat-people { display: none; }Hope that helps.
December 14, 2016 at 10:12 am #1292913
sosmondParticipantworked perfect, thank you!
December 14, 2016 at 10:50 am #1292969
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1281820 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
