Using Masonry to display woocommerce products from one product category.
If I set all products in that category to draft (we wish to temporarily suspend products from this categopry for example) instead of displaying no products as expected the masonry element on the page displays posts from random categories. As a reslut any masonry element displaying products from that category must be manually deleted from the page until the category has products again which is very painful.
I would expect (and need) a masonry element set to display products from a category that is empty to simply display no products.
Can you please explain how to acheive this?
Many Thanks, M
I think it’s easier just to hide masonry temporarily then try to fix it. Is it set to show other categories too or is it single category masonry?
Masonry set to show a single category. If this is empty instead of showing nothing, posts from random categories (including drafts) are displayed.
I see this behaviour on every site I test on – including fresh install no plugins. Is this a bug that will be fixed?
Secondly – hiding the masonry when category empty is exactly what I want to do – but this MUST be automated (I cannot manually disable masonry on hundreds of pages when a category of product is out of stock). How would I do trhis?
This is the intended behavior, it shows random posts if the chosen category is empty, yes. I know it is not ideal but this is how it works.
You must be logged in to reply to this topic.