meta_query
should be an array of arrays like:
...
'meta_query' => [
[
'key' => '...',
'value' => '...',
],
],
...
Related Posts:
- meta_query: using BETWEEN with floats and/or casting to DECIMAL
- WP Query post meta value
- get_post_meta slowing down my page load (in a plugin)
- get_posts return only first result
- update_post_meta performance in a loop woocommerce
- update_post_meta performance in a loop woocommerce
- Get posts with any value in attribute
- When should you use WP_Query vs query_posts() vs get_posts()?
- order by numeric value for meta value
- Using get_posts vs. WP_Query
- Delete all posts from WordPress except latest X posts
- How to query only for products with status “in stock” in WooCommerce? [closed]
- Differences Between WP_Query() and get_posts() for Querying Posts?
- get_posts with multiple categories
- Use of caller_ get_ posts
- WP_Query for WooCommerce Products
- WP_Query displaying ALL posts
- What is an efficient way to query based on post_meta?
- Use post__in and post__not_in together?
- Different Results with query(‘s=computer’) vs get_posts(‘s=computer’)?
- How to combine tax_query and date_query in WordPress
- how to retrieve specific product attribute value in an sql query?
- Query for posts from any post type but only add instock products
- Get all posts without tags
- How to get sum of meta_values of a meta_key in wp_query according to conditions
- How to find out what “Blog pages show at most” is set to [duplicate]
- Best approach to create Hot and Trending sections
- WP_query category__in not working, only pulls from first category
- Order posts by meta value and Date
- How to make orderby ‘meta_value_num’ OPTIONAL?
- How do you Query posts with nothing in common?
- WP_Query, tax_query and term_meta: How to?
- Get meta info related to current post
- Select from wp_post and multiple meta_value from wp_postmeta
- WP_query posts closest to todays date
- Woocommerce returns Product post_status as published even tho it is in status draft
- exclude posts with a specific custom field and value
- showing all search result in one template
- Get attachment by meta_key value
- Woocommerce query all products and categories
- Help with WP_Query – Too many mySQL queries
- Using hook to use DISTINCT in a wp_query
- Where to put meta Keys
- Having trouble with WooCommerce Storefront child theme single.php “related posts” modification [closed]
- Large AND OR query timing out
- Check return value of get_posts
- wp_query not working with post_type
- Get all posts which was posted on X Days WordPress
- Query post with meta value in set of values
- get_posts always returning the same number of posts = 5
- How do I check if an article is popular this week?
- Redirect Search to Form When No Product Results Are Found
- WP_Query Taxonomy categories filtering
- Exclude a Woocommerce product from WP_Query
- get_posts custom field
- How to apply a function to a metadata value before launch a WP Query?
- Posts query according to meta box date
- Assign a minimum result count for WooCommerce query shortcodes?
- var_dump of WP_Query object is not empty, while .have_posts() return false
- Nested array issue in meta_query
- Display post meta conditionally based on it’s value
- Function using get_posts() with tax_query not working when called from functions.php
- get_posts query matches too many results
- Sort by custom field that is an array?
- Search for pages with permalink
- WP_Query meta compare must include ALL array values
- How to query for a page, get data, then query for child pages of that page
- Tax Query on product_cat using NOT IN as operator does not exclude that category
- Woocommerce Shortcode which displays a table with product data
- get_posts query is taking about 40 seconds to execute
- Customize the Sorting Dropdown in WooCommerce use another list or more page
- wp query to use both author id and meta_query
- Sort by price wpdb
- Trouble with serialized metadata
- How sort products by calculate value? ( custom post meta, price, option)
- wc_get_products() return empty object
- How can I filter products by meta in Woocommerce REST API?
- Custom filter from post meta
- Select multiple categories with is_tax
- Query child posts with tax query on parents
- Slow Query with more 100 products
- Create global array to compare inside a query
- I can’t get post based on its postmeta value and key
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- Saving custom fields for WP_Query to retrieve
- I cannot get tax_query in get_posts() to work with custom taxonomy
- Getting the last X posts, but in ascending order of time
- How to show all the associated posts with specific date of data metabox?
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- WP_Query Posts by Metadata from Option Tree
- WP Query to order posts by multiple meta fields
- Custom Search Query – include only custom fields and title
- How to count post meta key values for all posts in database
- Retrieve posts in custom post type and specific taxonomies
- wordpress sorting using array merge by price in ascending order but price with 0 must be show last
- Query posts by meta value and sort by another meta key
- How to replecate the _fields parameter in custom REST api endpoint
- How to retrieve _embed (etc) fields in get_posts custom query?
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- Extend search query to search meta keys values based on search string