0
votes
1answer
34 views

Why won't draft listings appear for non-admins?

I have a draft post with the author set to 5. User #5 is trying to view that draft on the front end using a WP_Query with the following arguments: array { ["name"]=> "example-52f00a8ba19f4" ...
-1
votes
1answer
75 views

why do drafts return as part of wp_query?

I have some code as plugin, which I call via AJAX from a page one the site. It gets two drop-down values and uses them in tax_query to fetch some posts. Question: why do drafts return amongst results ...
1
vote
0answers
285 views

Does the WP_Query 'private' argument for post status only apply to privately published content?

The only peice of code that I can find that applies to this is on line 2430 in query.php in WP 3.4.1 foreach ( get_post_stati() as $status ) { if ( in_array( $status, $q_status ) ) { if ( ...
2
votes
1answer
138 views

Get images only if parent status is publish

I have a site which uses a custom template page for each image, and users can favorite an image. I am then pulling a page of most favorited images: $args = array( 'post_type' => 'attachment', ...
0
votes
2answers
2k views

Can't get drafts with WP_Query using post_status parameter

I can't seem to get drafts to show up with WP_Query, even when post_status is set to 'any' or 'draft' $args = array( 'p' => 1234, 'post_type' => ...
0
votes
1answer
790 views

How to Get All Posts but the Private ones?

I am creating a frontend mosaic view where i need to show the most recent posts. So i need to show all published posts to every visitor, but keep the private ones for the logged in users. I know how ...
10
votes
3answers
14k views

How to Get All Posts with any post status?

i am creating a frontend dashboard where i need to show all the post by the current user. So i need to show posts with all post status. Mainly published, trashed and the pending. I am now using ...