I am trying to add a search string to the query_posts() function in WordPress to be able to perform a search by multiple strings. However, I am not sure how to build the $args array that way.
The following works if I want to search by "string1":
$args = array( 's' => 'string1');
But if I wish to search by "string1" OR "string2", my guessing was wrong about the following which doesn't work:
$args = array( 's' => array( 'string1', 'string2' ));
Is there a way to handle this task properly, please?
This topic is now closed. New replies are no longer allowed.