How to make a custom query for vendors and listings?

I set up a page where I’d like to list all of the vendors that meet certain criteria, such as a user meta value. The only option for filtering the vendors on the vendors block is categories, which is sufficient in my use case. Do you maybe have a shortcode with additional attributes that I can use? Or a PHP filter that I can hook into? I would really rather not have to make a completely custom shortcode and rebuild the whole thing from scratch. I have other use cases for listings, but this is one example for vendors. I figure if you have a method for vendors, you likely have one for listings. TIA.

Hi,

Unfortunately, there are no such filters in the vendor block yet. We recommend the easiest option is to use the Vendors block and then add a custom code snippet that will check that it is this page using the ID, and if it is the right page, it will overwrite the query through the pre_get_posts hook and change the WP vendor query there.

I believe this will be useful to you.

Thank you. That should work. I’ll give it a try.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.