You can add post_status to your query, the string ‘any’ will return all posts no matter the status, or you can use an array to just grab those you want.
$args = array(
'post_type' => 'post',
'orderby' => 'title',
'order' => 'ASC',
'post_status' => 'any',
'posts_per_page' => 10,
);
http://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters
Related Posts:
- Order by DESC, ASC in custom WP_Query
- Exclude or Include category ids in WP_Query
- Changing the meta_query of the main query based on custom query_vars and using pre_get_posts
- Query Posts in a Predefined Order
- $wp_query initiation?
- Changing Posts Per Page and offset with pre_get_posts
- Add the “active” class only to the first loop item in a WordPress query [closed]
- Get posts by meta data OR title
- Display Posts by modifying the where clause only for my query
- Pagination causes error 404 when used with front-page.php
- Get only 1 Most Recently Modified Child Post from Parent
- Using AJAX to return search form results
- How to get a category in a list item class
- Add custom search results to main WP search [duplicate]
- Should close $wpdb via $wpdb->close()
- Finding post content that begins with a specific character
- Does meta_query need numeric values to be cast to integers?
- SQL Query inside Widget
- WordPress documentation – WP_Query arguments
- WP_Query with multiple meta fields filter?
- Use ‘parse_query’ filter to show posts that from multiple criteria
- Using apply_filters(‘the_content’, $custom_query->post_content) alters output
- WP_Query Date Query After Minus Hour AND minus minutes
- Get posts for last working week in WP_Query
- Shortcode to show thumbnail and link for 3 random posts
- wp query template tags not working
- How to select events within current week using wp_query
- how to link to detail page(single.php?) in a wp_loop
- WP_User_Query unable to retreive all user at once
- Meta Query Array Error 500
- How to Filter Posts by Custom Fields?
- Display posts from only one post form in custom query and exclude in main query
- Get pagination working for custom loops within page templates
- Complex WP SQL Query
- pagination with ‘no_found_rows’ => true,
- How to get all product attributes for filters in WooCommerce?
- Fetch Record based on meta key dates
- How can I display list of all posts from a specific author, with publish dates in the future, on an author archive page (author.php)?
- Custom posts visible in admin, but truncate in public
- Query to get siblings and parent page
- Why does get_posts only show results for Admins or logged-out users?
- How to store and receive variables in WP sessions?
- How to list posts with disabled/closed comments, with pagination?
- Add filter post_where and passing post_type argument
- WP_Query infinite Loop
- Limiting number of related posts
- Get Child Page IDs by Parent ID
- how would i change post->ID to work correctly when querying pages?
- WP User Query with Custom Fields and Search Results
- Pagination works in custom query loop but it doesn’t work in shortcode
- Event with multiple dates, display events chronologically
- WP_Query order by not working properly due to category I believe
- WP_Query to get post on frontpage
- When listing child pages run out of memory
- Function to retrieve IDs of posts, cache results, and improve wp_query
- How to avoid filling up an array each time I run a WP_query?
- How to SQL query posts IDs by categories AND authors?
- Search.php – return number of results but cannot loop through
- Creating ‘posts page’ loop based on the page itself
- Admin: Custom Query Returning Permissions Error
- How to get pages of parent (non-recursive)?
- wp query remove posts from query then update max pages and posts found
- WP_Query Orderby meta_key and hide some meta_key
- Show X taxonomies of the latest published posts
- Combine query in WP_User_Query()
- Combine relationship posts with existing wp_query
- Custom wp_query inside a conditional stament inside a template part doesn’t work: why?
- Slick slider for post doesn’t display anything
- What is the equivalent WP_Query of a SQL Query?
- create custom shortcode wp and put php code in
- WordPress Query custom ordering by temporary variable
- Check the stored / cached WP_Query with transients on post change
- New template file does not load category-specific post
- use mysql variable in a $wpdb->query to reindex a column?
- How to get only present and past posts with post_date
- How to create better WP_Query to look for date time which is anywhere between two meta values?
- Query WP Posts, then list the taxonomies from those posts
- Query post with content only
- Load WP Query with Ajax
- WPQuery loop not giving expected output
- WordPress tax_query ignoring relation OR
- pagination functions are not working
- Gather same custom field values in one value in a select tag with wp_query
- Fetch only categorized posts
- Wrap group of wp query posts to parent div by date/year
- Continue loop after $queryObject
- Order Posts By Youtube Views
- Wrote a WP Cron Plugin and it triggers a fatal error upon activation
- Declare inline background image in functions.php
- Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]
- Getting Year & Date inside wpdb [duplicate]
- loop through custom post types with meta data
- Looking for a way to exclude frontpage and nav menu from query filter
- Using Query In Post Type Archives
- WP Query Obj: Set value to be unequal | Hide media by admin
- the_excerpt() not working in custom archive
- Get posts by meta value except one post [closed]
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- Get posts using multiple values from ACF checkbox as meta query wordpress
- Why ignore_sticky_posts argument is in sticky post query?