It looks to me like you’ve gone too deep with your meta_query
argument. The meta query should be an array of arrays; you’ve got an array of arrays of arrays.
Try:
$args['meta_query'] = array(
array(
'key' => 'status',
'value' => 'Retained',
'compare' => '='
)
);
References
WP_Meta_Query
class (which is used to parse themeta_query
argument forWP_Query
)
Related Posts:
- How do I Paginate Search Results for Custom Post Types?
- Pagination not working with custom loop
- Advanced search form with filters for custom taxonomies and custom fields
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- Search multiple custom fields by using meta_query
- Custom Post Type – Taxonomy Dropdown Menu?
- How do I implement custom fields without using any plugins?
- How I check if the same post slug has not been used before publishing?
- How to sort a table of custom posts by column containing custom field
- order by meta_value serialized array
- Pagination with custom loop
- Group list of posts by taxonomy and allow for pagination
- WP_Query pagination using only numbers instead of /page/1 on URL
- Custom post metadata not appearing in public API
- Automatically Insert Custom Field on Custom Post Type Publish
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- pagination redirecting from page number url before page requested
- Create a post in custom post type using field in registration form after users submit form
- WordPress custom meta field for custom post not storing data
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- CPT: if more than X images are in post, use pagination
- List all images from a single post meta value
- Publish an XML feed from a CPT with ACF fields?
- WP_Query: include custom post type only with specific meta value
- Meta Key Value in current-user-only loop
- How can I dynamically add a post to a custom post type which uses a custom field?
- dynamically add a custom field or metabox to custom post type [duplicate]
- How to implement a Google map store locator
- Random image from tag/custom type on sidebar
- retrieve Meta field value from CPT and set those values as Image Meta Field “Title”
- Set a maxlength for the title input in a custom post type
- Update Post Meta for a logged in user
- Problem querying Custom post type by custom fields
- Using custom field content as expression in IF statement [closed]
- ACF From & To Date Validations
- Query Multiple Custom Posts by Custom Fields
- Woocommerce custom field search in custom post type [closed]
- Is it possible to to use custom post type types on a page with the same slug somehow?
- WordPress custom post query with pagination
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Meta Query posts not showing on ending date of custom field
- Cross reference custom post types
- Custom Post Fields at the beginning of a Custom Permalink
- Possible to filter custom post type with multiple meta data?
- can these 3 queries be re-written as 1 query?
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- How to Get the title of a custom field?
- Create custom post with meta field with AJAX and the WordPress REST API
- Specifying meta field’s column type in Database using add_post_meta
- How to customize work area / admin area in a custom post type without plugins?
- delete_post_meta() for whole CPT / multiple posts?
- How to inherit field value from parent post into in child / sub post
- hide specific div on single.php [closed]
- How to get_term_meta on single custom post?
- How do you output an unknown number of images in a custom post type with desired markup?
- How to fetch custom post types with its full data on wordpress?
- Generating and downloading files with WP API
- Difference between page and paged
- Add a class to post_class if more than one post shares same meta_value_num
- Front-end Image Upload to Custom Meta Box
- How do I list a custom field and custom taxonomies for each result in a loop?
- Custom fields for post or terms which don’t update on post update
- ACF – Retrieve custom taxonomy from a relationship field
- Pagination links for custom post type shows correct number of links, but links result in Page not found
- Pagination for custom post type giving 404 error (but only for news page)
- Display Posts that fit a certain criteria on Category pages
- Sort custom post column by generated value?
- How to only display all posts to a custom User Role?
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Custom Post Type Pagination getting 404 error
- Numeric pagination custom post type
- Filter posts by their related field’s custom field
- register_rest_field update_callback don’t work for $_FILES
- How to convert Post Object Custom Field into Tags
- Filter custom WP_Query by first letter of a custom field – hopefully using Search and Filter Pro?
- Custom post pagination not working
- sorting in wp query based on custom field value
- PHP Notice: Unidentified index
- check_admin_referer not working in custom meta box for custom post type
- How do i create user accounts from custom posts that have email addresses
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Best way to use Category & Custom Fields?
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Paginate custom taxonomy category with wp_custom_pagination
- Custom post type navigation on static page
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Custom pagination [duplicate]
- Custom post type with custom fields enabled, is there a way to set a default group of fileds?
- Storing/querying custom date data
- Pagination not working with custom loop
- I want to split this into two functions
- Repeatable Custom Field for Media Upload
- Pagination not working with custom loop
- How to store datetime from custom meta box so that it can be sorted by
- Custom Post Meta on a Different Page?
- Adding a custom field after post title (ex.Example Title [30 Second Read])
- Creating post custom field text area
- querying to custom field over ACF REST API
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?