Support

Account

Home Forums Add-ons Repeater Field Get specific repeater row based on Meta Query with Wildcards

Unread

Get specific repeater row based on Meta Query with Wildcards

  • Hi there,

    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, heres a brief example.

    I have a meta query thats 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.

    Thanks,
    Luke

Viewing 1 post (of 1 total)

The topic ‘Get specific repeater row based on Meta Query with Wildcards’ is closed to new replies.