Skip Navigation

[Resolved] Needing to Exclude Product Category from View Displai the results using search

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by aprilA 4 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1532309

Tell us what you are trying to do?
I currently have a view that is setup to allow the user to do a custom search through our products using a view. This view was setup with Display the results using a custom search. In my options I do not have the option to add a filter to exclude a specific category from the search.

I want to be able to exclude a Discontinued Category from the search area. What would be the best method to do this?

#1532701

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi April,

Thank you for getting in touch.

Does that discontinued category have any posts assigned to it ?

If not then you can just delete the category from the taxonomy itself.

Thanks,
Shane

#1532723
Screen Shot 2020-02-28 at 1.40.31 PM.png
Screen Shot 2020-02-28 at 1.40.23 PM.png

This reply doesn't make sense. Here is screenshots of the options I have available. I need to be able to filter out certain woocommerce categories or for the filter to not show products when marked out of stock.

I believe you are confused on what I am asking. I don't need the dropdown search option to not display Discontinued Products, what I need to when a user loads the view, that the view doesn't show any products that have been labeled as discontinued or out of stock.

#1532807

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-02-28 at 3.06.18 PM.png

Hi April,

How is a product marked as Discontinued ?

Also to filter out for products that are not in stock please follow the steps below. In your case you don't have the query filter section enabled, so we will need to enable it.

1. Edit your view and scroll to the top.
2. Click Screen option in the top right hand corner and enable the query filter section.
3. Go to Toolset->Settings->Frontend and then click "Select Custom Fields" under the hidden custom fields section.
4. Search for _stock and enable it.
5. Go to your view and go to the query filter section and add a filter for the _stock custom field.
6. Then set your filter to a <b>Number</b> greater than 0. See Screenshot

Please let me know if this helps.
Thanks,
Shane

#1537513

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.