How to query for multiple meta key values with the same key i have this query but multiple value not working for me, Where is my code wrong?
if( isset( $_POST['scheduled_scan'] ) && $_POST['scheduled_scan'] == 'on' )
$args['meta_query'][] = array(
'key' => 'antivirus_antivirus_featured_scaning',
'value' => array('scheduled_scan','anti_spyware','anti_worm'),
'compare' => 'LIKE'
);
this is a full code in my form and query if you need
i used the advanced custom fields for keys
thanks for any help.
LIKE
with an array of multiple values. What does the value ofantivirus_antivirus_featured_scaning
look like?antivirus_antivirus_featured_scaning
is a checkbox field and i tried with'='
but not work i used advanced custom fields pluginantivirus_antivirus_featured_scaning
had been a custom taxonomy then this query would see massive performance gains, as well as free archives and templates for thse terms. If you're using ACF then it's a simple switch to tell ACF those fields are saved as terms in a custom taxonomy