$search_term
is already an array of an array. When you eventually add that to your meta_query
, you get an array of an array of an array, which will not work
You are using AND
as your relation
operator which is the default for a multi-array meta_query
. I would suggest that you drop that, and then simply just feed $search_term
directly to your meta_query
. No arrays.
Example
'meta_query' => $search_term,
Related Posts:
- WP Meta Query for some meta (array) values
- meta_query with array as value
- Adding an array from a query string to a WP meta_query
- meta_query returning excluded result
- Trouble with serialized metadata
- WP_User_Query Orderby Not Working
- Sort Posts with custom meta key by default which is currently set as optional
- Creating Custom Query
- How do I have multiple metaqueries inside one wordpress query
- Meta_query compare operator explanation
- Nested meta_query with multiple relation keys
- meta_query ‘compare’ => ‘IN’ not working
- Sorting: custom query with orderby meta_value_num THEN by title
- WP_Query with checkbox meta_query
- ACF Relationship Field Search Filtering [closed]
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- Query Multiple Post types each with own meta query
- How can I save an array from a random post sequence for later use?
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- Meta Query with date and time on the same Day before given time
- How to grab metabox value in wp_query meta_query key
- Is “orderby” in WP Meta Query conflicting with Meta Query?
- How can I create a WP_Query that returns posts where one meta_value
- Sort users by meta_value_num
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- Using WP Query to search within ALL keys in meta query
- WP Query – Get WooCommerce Products with variation that is in stock
- Meta_query with or without value
- How add a custom posttype name using ACF field to a query post array
- WP Query for variable taxonomies
- Minimize database queries to user tables?
- Add condition of user capability in WP_query
- (Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array
- How to make Meta Query case sensitive?
- Performance when getting post meta for post retrieved by meta value
- Any number in meta key (wp query)
- Is it a good idea to improve meta query performance by adding tax query?
- How to list custom fields as headers and list all pages sharing that custom field under it?
- Modify wp-query and sort by post meta key
- Tax query AND/OR meta query [duplicate]
- Orderby listing issue
- Help ordering Post loop by two meta values
- Make meta query treat meta_value as 1 or 0
- Removing duplicate values between two wordpress queries
- Combine results of multiple WP_Query to resemble single WP_Query
- Is this meta query problematic?
- WP Query Meta Value – How To Identify Specific, Unique Values?
- Order by meta_key doesn’t work
- Appending to existing WP_Query’s meta_query if exists
- Multiple meta_key ordering with pre_get_posts
- Get meta_value of a specific meta_key from all posts belonging to a specific custom type
- Custom query filter by ACF date custom field
- Nested array issue in meta_query
- WP_Query with page_ids in arguments without a result
- Error in meta_query not get result
- Query using string from custom field as array value
- Comparing 2 Decimal Numbers from custom fields and displaying posts
- How to get current page nearest parent id?
- meta_query with array as value with multiple arrays
- Why doesn’t my WP Meta Query return any results?
- Order (by ASC) posts with meta_key so posts without values are last
- Search filter between promo and exact price
- meta_query – check for multiple meta values in key which holds an array of values
- WordPress Meta Query Null Values Order
- show most viewed post
- Searching for a specific month in a metadata saved as Timestamp (Wp_Query)
- Why can my filter query SOME metadata but not other metadata?
- Getting posts by custom field value
- WP_Query on custom key and value
- Get posts having meta value between two numbers
- wordpress multiple meta value query is not working
- How to set meta_query if get_post_meta returns nested array for that key? [duplicate]
- Pre get posts sort by meta key returns no results if meta key does not exist
- Sorting with meta_query and multiple, optional meta keys
- meta_query with relation = AND not working as expected when combining EQUALS with NOT EQUALS
- WP Query for Multiple Post Types
- Query by meta value (add a dropdown of all values)
- Sorting Posts by Taxonomy thats not within the query’s $args
- Order Posts By Custom Field That is an array of objects
- Orderby query does not work for custom fields even with meta query
- make query more simplest and in one query
- date_query problem
- WP_Query returns empty if meta_query has more than 7 values
- Use not custom fields in get_posts() meta_query?
- Compare meta key separation
- WordPress meta_query not working
- Using orderby with 2 meta keys
- wp_query – Modify $query to include duplicate content
- How to get several fields from wp_query?
- Issue with WP_Query (need a array of selected ID’s)
- WP Query posts__in not working with array
- Passing conditional arrays to WP_Query() [closed]
- WordPress Query Default Order if Meta Values Same?
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- Wp query by 2 meta field – check if they exists / have value
- Get all user with both meta_value
- How to get all post_id and meta_value using meta_key in wp_postmeta table
- WP Query – Show custom posts only if user contain some user meta
- How do I subquery with custom meta fields?
- Showing Counts on Comment List with Custom Query