Home Forums ACF PRO % in query on repeater Reply To: % in query on repeater

  • I think that you missed the important point of my article. Make sure you read the code example and the comments in the example.

    You’re using update_field() which is updating an acf field and the new field is outside of ACF and added using standard WP function

    You’re also updating the field with an array and you can’t do a query based on an array stored in the database.

    The idea is that you get each row of the repeater. Concatenate something into a string, for example 100/90/17 and then save each of these strings using add_post_meta(). Then when you query the posts you do a meta query on this new meta_key and the value you query by is the concatenated a similarly concatenated string.

    This will be more difficult in your case because you’re using a taxonomy for these values so you’ll need to get the string values you want to concatenate from the terms. But the idea is the same. You need to have unique values stored into a standard WP custom field that you can query on.