Wp Query custom search by meta query
I did it this way: $name = explode(‘ ‘, $name); foreach($name as $string) { $args[‘meta_query’][] = array( ‘key’ => ‘name’, ‘value’ => $string, ‘compare’ => ‘LIKE’ ); } Which works good, but I’m not sure if that’s the best solution.