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

learn more… | top users | synonyms

0
votes
0answers
30 views

A user role to view only draft posts

I would like users with the role 'revisor' to see posts in draft status. I've tried the below, but I get a 404 error. What do I need to change? function draft_post_revisor( $query ) { $role = ...
1
vote
1answer
1k 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 ...
0
votes
3answers
2k views

Override private status - Enable users to read private posts

Hidden private posts for not logged in users The private posts are by default only visible when logged in. Override, show private posts for everyone Is there a clever way to override this? Make it ...
1
vote
1answer
896 views

How to set default status to custom post type

When I save my custom post_type 'product', I'd like to set their status to my custom status 'incomplete'.
0
votes
1answer
28 views

'transition_post_status' only fires when pressing “Add New”

I want to fire a function when a new post (cpt) is published. function my_publish( $new_status, $old_status, $post ) { if ( $new_status == 'publish' && 'publish' !== $old_status ) { ...
0
votes
1answer
28 views

“Publish immediately” with custom post status

I've registered a custom post status 'Editing'. Whenever a post is changed to use that status, the Publish time is set to the time the status was changed rather than 'Immediately'. This is ...
0
votes
2answers
488 views

How to add custom status to quick edit

I have added some custom post status to WordPress, I can able display in New and Edit interfaces of POST. I would like to display those to quick edit too. Also I need to apply some condition to ...
1
vote
2answers
777 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
1answer
19 views

Is it possible to change an existing post status from 'pending' to 'publish' via email?

I am building a website which uses a custom form plugin, and the plugin gives me the ability to create posts (pending or published) using the data from the form. Upon submission of the form, I want a ...
2
votes
1answer
17 views

Comments Feed & Custom Post Statuses

I have added 2 post statuses to regular posts. They are "resolved" and "unresolved" - essentially basic tracking for issues. Both are registered as "public". Posts from these statuses are displayed in ...
1
vote
1answer
40 views

Add a simple JS Alert Box on Post Submission

I want to add a simple Javascript alert box when a product is added by the customer for review. However, using the post status transition hooks, a white page is created after the popup. Is there a ...
1
vote
0answers
30 views

Posts and Attachments with “Published” status in Search

I would like the search to show only published posts and attachments (the attachments are photographs taken directly from the media library). The trouble is, when I specify that the post_status must ...
1
vote
1answer
38 views

delete custom post based on custom field date

RESOLVED ## updated code below. I had created custom post type called 'esitykset' and I wanted to delete them if they are older that the date in 'show_date' custom field of the post. So I tried the ...
0
votes
0answers
19 views

Hook into Post Exirator's expiration code

I need to run some code when a post from a custom post type is set to draft, which occurs automatically with the Post Expirator plugin. My code is set to run on the publish_to_draft action, however I ...
0
votes
1answer
48 views

Implement post status update as frontend news announcement

Is there a way to implement a function to print status update on the home page. eg. 2016/04/17, there are 2 articles posted in category ABC 2016/04/17, there are 3 articles posted in category DEF ...
0
votes
2answers
139 views

Removing all post statuses from a Custom Post Type

I have a custom post type and I would like for it to not use any of the default WordPress post statuses, but instead only use the custom ones I create for it. Is there a way to deregister a post ...
1
vote
3answers
3k views

How to Modify this $wpdb query to accept an array of post statuses

I'm using this function from this accepted answer, which gets all values for a custom field key (cross-post). How could it be modified to allow an array of post statuses? function get_meta_values( $...
2
votes
2answers
407 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
54 views

how to remove dash (-) post status from post title on posts listing page wordpress

I want to remove post status from post title. E.g Currently on listing page post title comes like "Hello World - Draft" or "ABC - Completed" I don't want - Draft or any other post status. Note* : I ...
0
votes
2answers
1k views

Check whether a custom taxonomy term has published posts?

I'm making a magazine theme for a client and using a custom 'issue' taxonomy. There is a new issue every week, and I also have a function that get's the latest issue. But the editor creates a new ...
1
vote
0answers
26 views

How to use same page template if post status other than 'publish'?

Quick question about relationship between post status and template. If non-logged user tried to access a page(or a post) which status is private or draft (or anything other than publish), how do I ...
0
votes
0answers
12 views

Remove QE options and edit link from the title for a custom status and based on capability without js

I'm trying to remove the quick edit option and the edit link on the title of the post in the admin post list. I'm trying to do that on user capability and a custom status. Basicly when a post have ...
0
votes
1answer
37 views

Also show terms that are related to draft and pending posts

Im using wp_dropdown_categories to output terms in dropdown menu but it only shows terms that are related to published posts. I wonder if there's a way / hack to include terms that are related to ...
1
vote
1answer
40 views

Wp_query Add specific pending posts

I want to retrieve in archive all the posts with post_status-> publish and those with post_status->pending of specific user. That's where i'm now: $custom_query_args = array( array( '...
1
vote
1answer
194 views

How to change post status from publish to draft using hook in wordpress?

I want to change the status of already publish post to draft using its id. add_action( 'save_post', 'change_post_status', 1 ); function change_post_status( $post_id ){ $my_post = array( ...
0
votes
1answer
31 views

Submitted for Review back to a Draft page

I would like to allow a WordPress contributor to change a draft page Submitted for Review back to a draft page without giving the contributor the capability to publish pages. I have tried without ...
0
votes
0answers
97 views

Automatically move pending posts after 30 days and, update the post date, when users update the posts

I have a multi-user blog, and would like to implement two functions in WordPress 4.3.1. The first function moves publish posts in pending after 30 days. I used a add_action. My code: function ...
20
votes
3answers
38k views

How to Get All Posts with any post status?

I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in all states, mainly published, trashed and the pending. I am now using a simple ...
3
votes
2answers
13k 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. I need to have something where I specify which page ID's I want to list (about ...
1
vote
1answer
145 views

Function to change post status IF current user and post author are the same

I'm looking to force a post to revert to draft if it is published by the author. Here's the function I've wrote so far: function check_user_publish () { $user_id = get_current_user_id(); $author_id =...
0
votes
0answers
124 views

Can not get future_to_publish to work

I'm trying to figure out why future_to_publish will not work. Here is a list of what I have checked to work: draft_to_publish future_post publish_post transition_post_status (works ...
0
votes
0answers
52 views

Can you retrieve ACF data from post status hook?

I'm creating a reporting site where the admin can create reports for their clients. Within this there is a 'client' ACF field in which the admin can select a user to assign the report. I'd like to ...
0
votes
0answers
32 views

Auto draft posts when scheduled date is reached

I have a plugin that allows all scheduled posts to be visible immediately... I'm looking for a function that will automatically set a post's status to "draft" when it reaches it's scheduled date and ...
0
votes
0answers
35 views

Changing post status with js

I'm having issues grabbing some actions inside a navigation menu.. So it's going like this(for the publish button) HTML <a href="javascript:updatepost()" class="menu-item fa fa-facebook">Save&...
0
votes
0answers
109 views

date archive future posts

Im using cpt for events and i need to display them in a calendar. most of the events are future. i managed to query the right ones by post_status at the archive, but I need to do the same at the ...
0
votes
0answers
18 views

Unable to alter page status

After upgrading to 4.3 all of a sudden we find ourselves unable to alter the post or page status, visibility, and previewing now opens an editor window in a new tab. Repairing the database and ...
0
votes
0answers
16 views

Countdown Timer to Publish Draft

I am attempting to create a way for specific draft posts to be published after a 36-hour countdown. Basically, the site allows post submissions which are voted on, and the winning post gets ...
0
votes
0answers
55 views

Setting up automated post status change / delete system

Haha, first of all, I've been asking all my WP questions in stackoverflow and then wondered why everybody said they don't know nothing about WP. My question is simple: What's the best way in your ...
0
votes
0answers
82 views

Custom Post Type On Publish Update Meta Field

I'm wondering if someone can shed some light on how I can update a custom meta field value, when a new post is created in a custom post type? Specifically, I have a custom post type named '...
0
votes
1answer
108 views

Ajax function on #publish only saves as draft - how to make it publish?

I have a custom post type called "shift" (as in shifts worked by employees). When shifts are published, I run an Ajax function to check that this shift does not have a scheduling conflict. If there ...
0
votes
1answer
62 views

How to change post status link order(priority) on cpt listing page

On a custom post type listing page the registered post statuses are listed as links above the post lists. I've a situation where custom registered post types are showing after 'trash' and I still want ...
0
votes
1answer
31 views

Restrict access to a post once it is tagged as a given status

I am trying to make any post that has been tagged and saved with a certain status non-editable by editor users. I am using a custom plugin that extends the status' to include subbing, however, at ...
0
votes
2answers
74 views

Multiple Post Status

How can I assigned a post to multiple post status like it will be in 'publish' status and also a custom post status say 'hide' post status. by this publish post count will remain same and 'hide' ...
0
votes
0answers
16 views

Send Notification when new post is published in wordpress [duplicate]

Right now, I am sending notification to android application users when new post is created in WordPress. But issue is that, It sends notification also when draft is created and post is updated. Which ...
0
votes
1answer
163 views

Update status of all posts in a category

For one of my project I just want to change the post status of all the posts inside a specific category from publish to pending. It is possible to change status of multiple posts at once? I want to ...
0
votes
1answer
157 views

What function publishes a post when you click the publish button?

I'm trying to track down an issue with a plugin. In vanilla WP when you are on the post edit screen (/wp-admin/post.php) what function is getting called to change the post status from draft to publish?...
0
votes
0answers
153 views

get_terms(); show private posts when logged in

Hi have a custom post type "FAQ". I got some "FAQ's" that are private, also only visible for logged in users. I used "get_terms()" funktion for a widget that is listing links to the categories of ...
0
votes
1answer
120 views

Custom Post Status & Taxonomies

I have successfully registered my custom post types, custom post statuses and my custom taxonomies/terms. All is working fine but... It seems that both the 'categories' column within the custom post ...
2
votes
1answer
303 views

Change scheduled posts to published

I wrote the following function to change scheduled posts to published (I've got about 1000 of them). When I run the code below, the date change, but the status does not... Can anyone shed some light ...
0
votes
1answer
170 views

How to filter posts in admin by before date or by post status 'future'?

I have read/searched a ton of questions but all I find seem to be related to custom post types and such. The situation is that sometimes we happen to have a lot of posts waiting for to be published ...