Hello,
I have a custom field called “Location” added to a custom taxonomy. I am able to display the value of the custom field on the taxonomy page.
I am now trying to get all taxonomy terms based on Location value.
One hack-ish way is to loop through all taxonomy terms and check for the value of the custom field. But that query could be expensive.
Is there another, better way?
thanks.
Take a look at this topic about using term meta http://support.advancedcustomfields.com/forums/topic/how-to-use-wp-term-meta-on-acf-the-easy-way/. If you’re not aware of it term meta is something recently added to WP. I’m assuming that eventually term meta will be used in ACF without doing the extra work, but for now it will help you with this since it will let you do a term query that include meta queries.
I think this will solve the problem. I will give this a try.
thanks