Skip Navigation

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

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
- 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)

This topic contains 2 replies, has 2 voices.

Last updated by ashleighP 1 year, 10 months ago.

Assisted by: Minesh.

Author
Posts
#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

Languages: English (English )

Timezone: 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:
=> hidden link

#2540303

My issue is resolved now. Thank you!