I'm trying to see if I can make this happen with the built-in meta_query function. I'm taking a
$_GET variable and want to return posts that contain that string inside the meta_key
urls. So far, the below seems like it would be the most appropriate, but it's not returning values like I expected.
$search = '%' . $search . '%'; $args = array( 'meta_query' => array( array( 'key' => 'urls', 'value' => $search, 'compare' => 'LIKE', ) ) ); $helpquery = new WP_Query($args);
Any ideas on making this work, or should I resort to a more direct
I see this being marked as a duplicate, but my question is specifically regarding whether this can be done with the
meta_query or not.