I am trying to do something like this:
$args = array( 'post_type' => 'product', 'meta_query' => array( array( 'key' => 'custom-text-field', 'value' => '%rocket%', 'compare' => 'LIKE' ) ) ); $query = new WP_Query( $args );
My goal being that the query will search through all the text of the
custom-text-field and return any post where
rocket is found. However it isn't working (I either get all the posts or no results). Is this possible directly in the
WP_Query or do I need to use
$wpdb to construct something first?