WordPress allows you to set a workflow status of the content.

learn more… | top users | synonyms

11
votes
3answers
17k 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 ...
10
votes
2answers
371 views

Is it possible to have more “levels” of draft/published statuses?

Is there any way to have more post statuses other than just draft or published? For example, if you write a lot of posts, you may wish to type up all the content, and set the status of these posts as ...
6
votes
1answer
388 views

Changing post status in one click

I want to add custom button "Send for correction" somewhere near the "Publish" button. This custom button must change a post status from "Pending" to my own created status named "On correction". For ...
5
votes
1answer
591 views

how to assign a status/mark to post?

I want to mark some posts to include them in a featured content slider. For that purpose, I want to include a check box on the new post page, so that if the checkbox is selected the post is marked as ...
5
votes
2answers
2k views

New post status for custom post type

I have a custom post type recipes. I am using a cron script to automatically aggregate news into the database. It is currently being imported and saved as 'Pending Review'. Is it possible to create ...
4
votes
2answers
167 views

What is a “protected” post status?

I noticed in the register_post_status function in core that there is an arg for 'protected'. The following post statuses: 'future', 'draft', and 'pending' all have this set to true. I'm not talking ...
4
votes
1answer
89 views

Restrict a Post Types Post Status

I have a custom post type and a completely custom user interface to access it, and would like these posts to have a publish status. I know how to make them skip trash and be deleted immediately, but ...
4
votes
1answer
115 views

Using arbitrary post status without registering it

I want to use an additional, arbitrary post status on one of my custom post types. I'm calling it "limbo", and it's assigned to a post which has been deleted by the user, but one that I still want to ...
3
votes
1answer
1k views

Custom column for changing post status via ajax

I'm currently trying to implent a new custom column at the page manage screen that will let me change the status (published/pending) of the different pages via an easy toggle link. From what I've ...
3
votes
2answers
1k views

register_post_status and show_in_admin_all_list

I have a custom post status which should be public visible but not displayed in the "all" list of the edit screen. This is how I register the post status: ...
3
votes
1answer
300 views

Using get_post_meta with new_to_publish

I'm trying to read the custom fields set by the user when publishing a new post: function doSomething($post) { $meta = get_post_meta($post->ID); error_log("post meta: ".print_r($meta, ...
2
votes
1answer
498 views

How can I run custom function when post status is changed?

I can hook custom function to each of trash_post, edit_post, private_to_publish etc. to meet some of my requirements, but I need also to check for more possible transitions like 'pending to draft', ...
2
votes
3answers
2k views

How to 301 private posts rather than 404?

How do I 301 redirect private pages, rather than 404 them? If a post is private, WordPress filters it out in the SQL query, so there are no $post variables to work with. I'd like for this code to ...
2
votes
1answer
237 views

Getting the different post statuses + count like in edit.php, in a custom submenu page

I'm trying to create a submenu page for reordering posts/pages. Right now I'm trying to include the list that display the different post statuses, for example: All (5) | Published (4) | Draft (1) I ...
2
votes
1answer
150 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', ...
2
votes
1answer
1k views

What action is called when drafts are saved?

I would like to add a metadata field to the current post based on a checkbox in a custom meta box to be able to toggle my custom plugin on a post by post basis. For this I coded the following things ...
2
votes
1answer
581 views

Custom post status and preview

I am using wordpress 3.4 (the last before 3.5) and I have declared a post status type, and a custom user role called agent. It is for a custom post type, property. register_post_status( ...
2
votes
1answer
465 views

Create front end link to save post (or unpublish post) as draft

I have created a front-end posting and dashboard system for my users to add and edit their own posts. In the dashboard area, I have a list of their posts and the following options for each post: View ...
2
votes
1answer
146 views

Problem duplicated shortlinks bitly

I've this plugin to create shortlink using the bitly API, but there's a problem! function yoast_bitly_shortlink($url, $id, $context, $allow_slugs) { if ( ( is_singular() && !is_preview() ...
1
vote
1answer
1k views

Show scheduled posts in archive page

I'd like my archive.php page's daily view (is_day) to display scheduled posts (post_status=future). For example, if I go to mysite.com/2011/05/20 I would see all posts scheduled to appear on May 20. ...
1
vote
2answers
6k views

How to update page status from publish to draft and draft to publish

I am trying to figure out how to write the code that will allow me to do the following with pages of a WordPress blog? "To change a post status, you get the post, change its status field, then call ...
1
vote
1answer
474 views

WP_Post_List_Table::get_views - Have post counts account for filters?

Toward the top of the edit.php screens there is a list that displays post statuses along with the post count. I believe this is generated by WP_Post_List_Table::get_views. For example All (7) | ...
1
vote
1answer
128 views

Update post status from “publish” to “trash” for half of posts

I want to update half of all posts with status from published to trashed. Example: if I have 10000 posts, 5000 post to trash If I have 6000 posts, 3000 posts to trash If I have 7000 posts, 3500 ...
1
vote
1answer
108 views

Modify Post Status Arguments

Is it possible to edit existing registered post statuses? I am using the Edit Flow plugin to create custom statuses, however, the plugin does not offer the option to set whether the statuses are ...
1
vote
1answer
297 views

Custom Post Status Posts viewable to the public

I am using EditFlow's "custom status" feature for an event calendar plugin I am writing for a client. I've created a status called "previous events", when a date has happened the events post_status ...
1
vote
2answers
705 views

Additional page and post status types

I have a site where pages will often move from draft to published and then to legacy. I would like to create another status type similar to draft or published titled "legacy". Wherein the page exists ...
1
vote
1answer
108 views

Add new post with predefined / preset date

The current situation The plugin I'm currently working on is an additional post list view: A calendar, as you can see in the following screenshot. Admin calendar view with MP6 and handheld screen ...
1
vote
1answer
195 views

Detect type of post status transition

I have a function on my site that it supposed to run when a new post is published (email push notification), with the exception of the same article updated (i.e publish_to_publish transition, I don't ...
1
vote
1answer
465 views

Pending status by default for a specific role

I would like to prevent users from one specific role from publishing directly their articles. Only administrators should be able to approve these. The only choice they would ever have is to put their ...
1
vote
1answer
469 views

Custom date changer post_date => future - missed schedule error

I'm working on a custom event scheduler for my website that allows people to easily go in and set the article to post in the future. The reason I'm overriding the normal Wordpress functionality is ...
1
vote
1answer
1k views

Save author posts as in pending review - block users updating their posts

How can I let the users (author, editor, contributor etc) to edit their own posts but not to update them, just keep them as in "pending for review" so I can decide if it's ok to publish or not. By ...
1
vote
1answer
241 views

Why does get_post_status display published when attachment is in trash?

Is there a reason why using get_post_status() on an attachment page returns 'published' when the media item is actually in the trash? I'm trying to figure out if this is a bug or if not how to ...
1
vote
1answer
1k views

Setting a title on a Custom Post Type that doesn't support titles

I have a CPT called "profile" that only supports the editor and thumbnail. Each user is limited to posting just 1 profile. I'm looking for a way to prefill the title and slug fields with the display ...
1
vote
2answers
494 views

How to change post status from frontend?

I'd like to add the posts in my loop the ability to toggle them between different post statuses (e.g. publish/draft). What's the best way to do it? Thanks in advance!
1
vote
2answers
49 views

How to display future posts - modified query still yields 404

I have a very strange problem and I am stuck. I want the single page to display posts with the post_status of publish and future. So I added this code to my functions.php in my theme: function ...
1
vote
0answers
32 views

How to change custom post type status when non-admin updates post?

I allow users to submit posts (as a custom post type, "tribe_events") to my website. Is there a snippet I can add to my functions.php file that would change a post's status from "published" to ...
1
vote
1answer
443 views

How can a guest view the “Pending Review” Post?

When a user creates a new post it will have "pending" status. So I want the visitor (guest - not logged user) to be able to view "Pending" posts and vote it to "Publish" if enough "X Votes". Google ...
1
vote
1answer
438 views

Count posts by type including drafts and pending posts

I had this function that counts posts number by type (taken from wordpress codex) function count_user_posts_by_type($userid, $post_type) { global $wpdb; $where = ...
1
vote
0answers
121 views

Changing status of Published posts which have less Content to “Draft”

function draftpost(){ global $wpdb; $prefix = $wpdb->prefix; $wpdb->query("UPDATE ".$prefix."posts SET post_status='draft' WHERE LENGTH( post_content ) <500"); } ...
1
vote
0answers
325 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 ( ...
1
vote
2answers
260 views

Include Drafts or Future posts with count_user_posts?

I'm use the code below to get the number of posts by a user and it works fine but it only includes published posts. How can I modify this code or use different code to have it include "future" ...
1
vote
4answers
944 views

change a post status when users update posts?

Is there an efficient way to change a post status from 'published' to 'draft' when a user of a certain type tries to update their posts. I tried something along these lines function ...
0
votes
1answer
208 views

Enable commenting on front-end preview page for pending posts

We are in the process of allowing authors to collaboratively be a part of the editorial process. They will have access to all pending posts' preview pages (not post-edit pages). I want to allow these ...
0
votes
1answer
393 views

How to display pending posts on the homepage only for editors

I'm working on a project where editors need to see the pending posts on the homepage to improve them before publish. Maybe there is something to do with the loop in this way: If editors logged: if ...
0
votes
1answer
102 views

why there are so many posts whoes post_type is revision? will these records waste too much database space?

from the following data we may know there are only 30 records which are meaningful, and there are 92 records of revision post_type which can not be shown on the blog. so will these records waste too ...
0
votes
3answers
941 views

How to check if page has status published

How to check if page id(SomeID) is actually published?
0
votes
2answers
152 views

Auto-change Post Status on First Page Load

I have created a number of custom post statuses using the EdiFlow plugin. Now, what I am trying to do is, if the contribter visits the post edit page and the post status is "assigned" to automatically ...
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" ...
0
votes
1answer
157 views

Why this plugin doesn't work with media upload page?

I found this plugin very useful ajaxed-status It was created for post and page, and I want to apply it on media library. so I commented out the line if (is_admin() /*&& ($pagenow=='edit.php' ...
0
votes
1answer
26 views

Post Status Frontend Announcement

I want to announce the logged-in user in front end (theme, not the backend), how many posts he has with htis statuses: awaiting moderation approved (published) not approved(rejected) since last ...