user2893940
user2893940

Reputation: 89

How to filter data by custom field of custom taxonomy

I have created a custom taxonomy 'vendor' with some custom field 'address'. And registered this taxonomy with post type 'product'. Now i want to list all products with same address.

Upvotes: 0

Views: 123

Answers (1)

suvajit
suvajit

Reputation: 198

When you want to start the listing, first run a query to select all the taxonomies(vendor) which have that address. Then after that is done you will have the ids of all the terms and then use that array of terms in wp_query and pass them in the tax_query parameter.

Upvotes: 1

Related Questions