I’ve used Example 5 of: http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/ to query a post by a wildcard. However, my problem is I only want to display the row (from the repeater field) which is the same number as the wildcard within the meta query.
To give this more context, here’s a brief example.
I have a meta query that’s getting the availability of a property by the ‘week’ field, which is brought through via a form and $_POST data. For the example I’ve hard coded the value.
$search_args = array(
'numberposts' => -1,
'post_type' => 'property',
'meta_query' => array(
array(
'key' => 'availability_%_week',
'value' => '20140607',
'compare' => '='
)
)
);
I need to find what the number of the Wildcard is so I can then use it to get the specific row.
Any help would be greatly appreciated.