Hi, i need to get all post that has certain relations in subfield row. But those values are slugs of taxonomies. So, for example, for this format
$ParentName_$RowNumber_$ChildName
i need to get all post where:
Dogs_AnyRow_TaxonomyType->slug=”chihuahua” (from a select field)
AND
Dogs_AnyRow_TaxonomyColor->slug=”black” (from a checkbox field)
Could you give a real example of how to achive this?
Thanks in advance!
Hi @martinerre
In that case, you need to modify the query using the ‘posts_where’ hook. Kindly check this page to learn how to query posts based on subfield (under the 4. Sub custom field values section): https://www.advancedcustomfields.com/resources/query-posts-custom-fields/.
I hope this helps 🙂
Yes! I just solved this a while ago using the same example. Thank you!