I’m building custom search. Actually it’s just need to check custom field value. The custom field is called ‘summary’. However i’m not sure what i’m doing wrong as it is not working. Maybe someone will see what i’m doing wrong?
$thesearch = get_search_query(); // get the string searched
$args = array(
'post_type'=> 'post',
'paged' => $paged,
'posts_per_page' => 9,
'meta_query' => array(
array(
'key' => 'summary',
'value' => $thesearch,
'compare' => 'IN'
)
)
);
$search = new WP_Query($args);