[Resolved] Exclude Woocommerce Products from Search Results
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user wanted to exclude their products from the general site search on the frontend.
Solution:
This is actually an issue with Woocommerce itself. The Woocommerce setting on the Products to hide them from Shop and Search only applies to the Shop Search and not the general Site wide search.
Tell us what you are trying to do?
I am trying to exclude certain products from the custom search results archive. I selected "Hidden" from the Woocommerce Catalog Visibility meta box. I am using the WordPress Archives Block.
Is there any documentation that you are following?
I found the following ticket that is similar to my issue. https://toolset.com/forums/topic/exclude-products-from-view-if-woocommerce-catalog-visibility-is-set-to-hidden/
Its solution was "What if you edit your view and navigate to "Query Filter" section and try to add a taxonomy filter for the taxononmy "Product visibility" there you should select the two options "exclude-from-catalog" And "exclude-from-search" and also make sure you select the option "All of the following"
However I cannot locate where to add the taxonomy filter.
Under Loop Selection I have "Search Results" selected.
I see from your screenshot that you are able to find the option to add a query filter. When you look under the dropdown for the query filter are you not seeing Product Visibility ?
If not can you send me a screenshot of what you are seeing ?
Checking on your site I don't believe this one is related to our plugin as the product is still included even when i've set the catalog visibility to hidden.
This seems to be a known issue by the Woocommerce team hidden link
As such there isn't anything much that we can do about this until they resolve it.
Thanks,
Shane