Skip Navigation

[Resuelto] Blocks Archive Builder – Filter out private / hidden for Woocommerce archive

This support ticket is created hace 1 año, 10 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por ashleighP hace 1 año, 10 meses.

Asistido por: Minesh.

Autor
Mensajes
#2537849

Tell us what you are trying to do? Build a new archive page for woocommerce products that does not show products that are set to hidden from catalog or that are set to private.

Is there any documentation that you are following? No

Is there a similar example that we can see? On the classic editor for archives I could set the filter to exclude any posts that are set to be hidden in the woocommerce catalog to never show in the archive results. Is this functionality left out of the blocks editor?

#2538471

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - there is no feature available to add "Query Filter" using the block editor when you build the archive.

The alternate workaround would be you will have to use the standard WordPress hook "pre_get_posts" and add your desired code to include/exclude the things to change the WordPress archive query on fly:

Please check the following link and you can adjust the code as per your requirement:
=> enlace oculto

#2540303

My issue is resolved now. Thank you!