The syntax is not ‘post-type’ or ‘post-status’, it is with an underscore instead of a dash:
'post_type' => 'testimonials',
'post_status' => 'publish',
Related Posts:
- Where to put my code: plugin or functions.php?
- WP Query group/order by category name
- Custom Taxonomy and tax_query Issue?
- Orderby CPT custom fields not working
- Custom Widget WP_Query problem
- how to set a WP Plugin’s url
- filter the_content, custom post type, and wp_query
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- Wp Meta Query does not work while simple Query Works
- Get next and prev item from custom WP_Query and Custom Post Type
- Replace Content of Sidebar on Custom Post Type
- Widget area for individual posts (custom post type)?
- Error in WP Query. If variable is empty it is displaying previous post value
- Get Posts in a Custom Post Type category
- How to set a fall back template for a custom post type in a plugin?
- Redirect after deleting post and keep track of pagination
- get_edit_post_link() not working as expected when passed id in plugin
- How to query for posts (in hierarchical custom post type) that have children?
- WordPress custom post action hook
- Combine tax_query and meta_query in WP_Query
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- WP_Query pagination using only numbers instead of /page/1 on URL
- Uploaded image not appearing in custom post type
- Query for posts in 2 taxonomies
- How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]
- Parent / Child formatting in a list of post of a custom post type
- Custom Post Type get_post_type_archive_link( $post_type ) returns false
- How do I create an archive page for standard posts?
- How to have the right design for a custom post type without accessing themes
- Dynamic Custom Post Type Plugin
- Multiple post type queries (with specific arguments for each)
- Custom Post Type Loop within Shortcode
- Custom Post Type: Upload Multiple Images
- right_now_content_table_end function not working?
- Combining sorted and random CPT
- How to add post_type=value when editing that post type in the WordPress admin?
- Display CPT posts based on specific taxonomy
- showing custom post types of a certain category only
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Getting template_include to work when allow_url_include is off?
- WordPress post_where & posts_join not working only for custom post type
- Custom taxonomies relationship
- Custom Permalink to remove category word , keeping posts permalink with date?
- Prioritize posts in query by meta keys?
- WP_Query orderby and tax_query
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Different Ways to Query Custom Post Types?
- Possible to filter custom post type with multiple meta data?
- ACF in wordpress
- Theme independent plugin by using default page template
- Inefficient Query Confusion
- find custom post type post by searching its custom field with my string
- wordpress lists similar type of posts in a custom post type
- FacetWP paging custom wp_query
- Unable to format dates to put in event calendar
- Custom post type and custom taxonomy 404 on page 2
- Dynamic assign a custom template to custom post type posts
- Cannot get custom posts by category
- Shortcode with WP_Query more than once on one page
- Custom post type in Custom widget – $listItem
- Generating and downloading files with WP API
- Convert Custom Table Data Based Plugin To Be Searchable
- list posts of two post types in a single template
- How do I list a custom field and custom taxonomies for each result in a loop?
- Find Posts based on Child Post value
- Limit Amount of Pages users can create in Custom Post Types
- Change search query in wordpress custom post type
- Sort custom posts by date and then by taxonomy
- Query custom post type that has a serialized relational advanced custom field value
- How to add a default predefined thumbnail when creating a brand new post?
- Plugin Development using classes – Public & Private Callbacks
- Correct way adding External classes to Custom Post type and output their methods to template
- How can I query and sort custom-post type using WP_Query
- Custom query result empty on page 2
- How select query is generated in a Custom Post Type?
- Custom Page Template – Widgets of wrong sidebar
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- Custom Post Type Front Page Gives 404
- Output all terms slugs for a loop filter
- Post Query , breaks layout if a post is deleted
- Not able to get my custom search result using meta_query and tax_query together?
- Multiple WordPress Sites, Same Database but Filtered Content
- Custom Field as Custom Post type element class
- Display posts on parent post if author coincides
- WordPress query in which condition uses custom field
- WP_Query for CPT with filter by another WP_Query
- Is it possible to add query parameters on the archive page?
- WP_Query and two custom fields returns no posts
- Custom Taxonomy Showing in WP Menu
- Storing/querying custom date data
- Query Posts From Multiple Post Types
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Custom Post-type not returning the right child_of
- Hide custom post type and use its slug in new plugin menu
- How do I hide single category post on my post page
- querying to custom field over ACF REST API
- How can I show posts with the same tag?
- Load posts via AJAX without draft status
- WP Query – Can’t get posts with specific taxonomy