I strongly suspect the answer is 'no', and that I'll need to construct a custom SQL query, but I'd like to check as a last resort because using $args and WP_Query is so much neater...
If I have a text string $searchstring and look to construct a query like this:
$args = array(); $args['post_status'] = 'publish'; $args['s'] = $searchstring; $args['meta_key'] = 'intro'; $args['meta_query'] = array( array( 'key' => 'intro', 'value' => $searchstring, 'compare' => 'LIKE' ) );
and then try to get to a result with
$search_query = new WP_Query( $args );
the query will look for posts which match BOTH of these:
(1) the text string $searchstring is in the post title
(2) the text string $searchstring is somewhere in the value for custom field 'intro'
I want to look for posts which match one or the other of the above 2, not necessarily both.
Is this possible without having to construct a custom SQL query string?
Any help or hints would be greatly appreciated.