Support

Account

Home Forums Add-ons Repeater Field Why is my meta query only looking at the first index of my repeater field Reply To: Why is my meta query only looking at the first index of my repeater field

  • I added

    function add_cond_to_where( $where ) {
    
        //Replace showings_$ with repeater_slug_$
        $where = str_replace("meta_key = 'data_$", "meta_key LIKE 'data_%", $where);
    
        return $where;
    }

    to my functions.php and set supress filters to false like so

    $posts = get_posts(array(
    	'numberposts'	=> $limit,
    	'post_type'		=> 'opleidingen',
    	'orderby'			=> 'meta_value',
    	'suppress_filters' => 'false',
    	'meta_query' => array(
    			array(
    			'key'     => 'data_$_startdatum',
    			'value'   => $today,
    			'compare' => '>',
    		)
    	),
    	'order'	=> $order,
    ));

    But it’s getting 0 results?