array_merge does not work the way you expect/need it to, but honestly I am not sure why you are making this so complicated. All you need is:
$args = array(
's' => 'keyword1 keyword2',
'orders' => 'DESC',
'showposts' => 60
);
// var_dump($args); // debug
$query = new WP_Query($args);
var_dump($query->request); // debug
The built is search parser will break the s string on the spaces and construct a functional query for the terms.
Related Posts:
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- What kind of object type is WP_Query?
- How can I save an array from a random post sequence for later use?
- Getting an array out of WPQuery
- Use Transient API to cache queries for all posts in all categories?
- WP Meta Query for some meta (array) values
- meta_query with array as value
- Placing a div or img in between a post array using WP Query [closed]
- Show one post per author and limit query to 8 posts
- How add a custom posttype name using ACF field to a query post array
- How can I get an array of all IDs from the current queried object?
- How can I pick a single post from the latest 3?
- WP Query for variable taxonomies
- Minimize database queries to user tables?
- (Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array
- Adding an array from a query string to a WP meta_query
- Weird orderby => post__in issue
- How to list custom fields as headers and list all pages sharing that custom field under it?
- Query all posts if multiple meta key don’t exist
- Get posts by list of post IDs ordered by those IDs?
- Removing duplicate values between two wordpress queries
- Include current post into loop
- Combine results of multiple WP_Query to resemble single WP_Query
- How do I turn these values from MYSQL into an array
- Does meta_value (array) work with ‘orderby’?
- search serialised meta_value for date value?
- Combine 2 arrays in a query parameter
- How can I comment comma-separated array values?
- How do I add a relation parameter to my filter query?
- construct complex queries with WP User Query
- Get a list of ACF Repeater-Fields as array
- WP_Query with page_ids in arguments without a result
- Related Posts Excluding Certain Categories
- Query using string from custom field as array value
- Multiple meta query from array
- Category based on post id
- How to get specific string in explode array?
- How to avoid filling up an array each time I run a WP_query?
- Remove from array in WP_Query loop
- meta_query returning excluded result
- Combine relationship posts with existing wp_query
- Counting instances of words in the results of a post query
- sanitize_post() is not sanitizing Post Object
- Retrieve all custom field values of a specific custom field metakey as an array, inside WP_Query
- WP Query by 4 different taxonomies
- Trouble with serialized metadata
- What code to use in an array to call the current sub-category?
- WP_User_Query Orderby Not Working
- Loop through array of pages
- Repeat array inside array through while loop
- Sorting Posts by Taxonomy thats not within the query’s $args
- Related Post by Tags Code
- date_query problem
- WP_Query: Meta_Query with serialized value (or a workaround)
- how to query for meta_value have array
- wp_query – Modify $query to include duplicate content
- Iterate through ID’s in loop
- How to get several fields from wp_query?
- How to sort a WP_Query array by post_name after an array_merge();
- Issue with WP_Query (need a array of selected ID’s)
- WordPress WP_Query Array Custom search via taxonomies
- WP Query posts__in not working with array
- Sort Posts with custom meta key by default which is currently set as optional
- Dynamically name array in WordPress loop – add/get values
- Dynamically create array from page title
- WordPress Query Returning Every Post
- Creating Custom Query
- How do I have multiple metaqueries inside one wordpress query
- I want to place a post before all others from an ACF boleen field
- wp_query, calculate with two dates when ‘key’ is text format
- Orderby meta _value that is saved as an array
- Is it possible to completely stop WP_Query retrieving posts?
- Make loop display posts by alphabetical order
- Displaying several specific pages using WP_Query()
- WP-CLI How to generate a list of posts with corresponding meta values
- Warning: urlencode() expects parameter 1 to be string, array given
- Finding the next 5 posts
- Filter by title content and meta key at the same time
- Get all remaining posts after a particular post id
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- Improve wp query perfomance on large db
- If two first numbers exist in wp_meta_query value
- Function get_queried_object() return NULL in custom taxonomy
- Search pages that are a child of the current page
- WordPress search posts by author name with autocomplete
- WP Query using tax_query & meta_query
- How to control a common terms list from one place?
- Exclude Category filter from Portfolio section
- Different Loop for tag pages?
- WP_Query: attachment image in “full” size?
- Make a products only viewable to a specific user ID in meta_query pre_get_posts
- Get categories within specific term
- custom excerpt is not being shown
- meta_query only check if both value are set
- post_type not working when tag__in is present?
- Optimize WP_Query
- Help in query for list links
- WP_Query issues with argument posts_per_page
- Search (Custom Form, Custom Search Result)
- Prevent URL Parameter Affecting other WP Query