Skip Navigation

[Resuelto] Change Comparison of Checkbox Filter

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

How to make a taxonomy filter with checkboxes limit WooCommerce product listings to only those items that have ALL of the selected checkboxes.

Solution:

You can setup the taxonomy filter manually, for example:
Edit the the view block you mentioned above, there is a section "Query Filter" in the right sidebar, here you can setup the taxonomy filter as what you want,

For example:
Select posts with taxonomy:
Categories slug in all of those set by the URL parameter wpv-category

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/

This support ticket is created hace 4 años, 8 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Etiquetado: 

Este tema contiene 5 respuestas, tiene 2 mensajes.

Última actualización por aaronM-9 hace 4 años, 8 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#1551545
taxonomyfiltersettings.PNG

I'm trying to re-learn how to do views using the block editor and cannot figure out how to make a taxonomy filter with checkboxes limit WooCommerce product listings to only those items that have ALL of the selected checkboxes. Right now I think it just displays products that have ANY of the checked terms. In the video tutorial it says there should be a section in the search filter settings for comparison options but I do not see this.

Where do I tell it how to filter the view output based on which checkboxes are selected? See image.

- Aaron

#1551937
Query-Filter.JPG

Hello,

Yes, you are right, by default, views will output posts "that have ANY of the checked terms" .

But you can setup the taxonomy filter manually, for example:
Edit the the view block you mentioned above, there is a section "Query Filter" in the right sidebar, here you can setup the taxonomy filter as what you want, for example:
Select posts with taxonomy:
Categories slug in all of those set by the URL parameter wpv-category
eg. enlace oculto

See screenshot: Query-Filter.JPG
https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/

#1552587

Hi Luo,

Sorry, I know this should probably be easy but I'm still having trouble. The only spot I can find the "Query Filter" is in the document settings (lower-right as you said). However, when I click to add a filter none of my taxonomies appear in the list. It appears to be just post fields and custom fields.

- Aaron

#1552943
tax-filter.JPG

I have tried it in my localhost with a fresh WordPress installation, I can see both Woocommerce taxonomies without any problem:
- Product Categories
- Product Tags
see screenshot: tax-filter.JPG
Please make sure you are querying the correct post types, for example, in section "Content Selection", enable option "Products"

#1554901
no-taxonomies.png

Hi Luo,

The loop selection is set to "Products" as the post type (none others selected). Taxonomies do not appear in the list of available filter options. See screenshot.

#1555429

I was able to address this issue by reverting back to the classic views editor. I did not realize this was an option originally.