Support

Account

Home Forums Front-end Issues Using meta_query for complex search results Reply To: Using meta_query for complex search results

  • Hi mrdirby,

    have you tried using the ‘relational’ query to set this?

    $meta_query_args = array(
    	'relation' => 'OR', // Optional, defaults to "AND"
    	array(
    		'key'     => '_my_custom_key',
    		'value'   => 'Value I am looking for',
    		'compare' => '='
    	)
    );
    $meta_query = new WP_Meta_Query( $meta_query_args );

    I hope to have helped