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

learn more… | top users | synonyms

1
vote
0answers
19 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 ...
0
votes
0answers
8 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 ...
1
vote
1answer
35 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
1answer
41 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 ...
1
vote
1answer
38 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 ...
1
vote
0answers
22 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
33 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
35 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
155 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
29 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
82 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 ...
0
votes
2answers
91 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
1answer
99 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
102 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
47 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
31 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
34 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 ...
0
votes
0answers
91 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
53 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
68 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
0answers
68 views

Changing attachment status from inherit to pending?

I'm creating a web library that consists of about 1,000 PDF files uploaded as attachments (in addition to pages and posts which contain other information). I've bypassed the attach-to-a-page/post ...
0
votes
1answer
95 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
2answers
66 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
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
1answer
139 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 ...
0
votes
1answer
109 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
274 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
151 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 ...
0
votes
2answers
360 views

wp_query will not display draft posts

I'm trying to get wp_query to display ALL posts in an array but only ones with status published will: global $wp_query; $ids = array(130,132); $args = array( 'post_status' => ...
5
votes
1answer
257 views

WP_Query by post ID doesn't work if post is in custom post_status

I want to display a single post by its ID using WP_Query(). To do this, I use the following argument: $args = array( 'p' => 61202); That should work, but does not seem to work if the post is ...
0
votes
0answers
77 views

Include attachments with a custom taxonomy in search

I need to include attachments in the search. So far, I have managed this by hooking into pre_get_posts and checking if it's on the search results page, I add 'attachment' to the post_type and ...
0
votes
1answer
84 views

Show recent published posts

I want to list recent published posts of my wp blog and exclude certain posts of some categories. The following code works fine, 10 recent posts are listed and posts in the listed categories are ...
0
votes
1answer
826 views

Programmatically change post visibility on save_post action return a 500

I'm trying to change the post visibility for my custom post type. On the edit.php screen the user can use a custom field to set the post type to normal or extended. That field shall work as ...
0
votes
1answer
141 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
0answers
140 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 ...
1
vote
0answers
63 views

Add custom post type drafts to RSS feed

I have an RSS feed setup for my custom post types, but I'm trying to add in all posts with the status 'draft'. Here's what I've tried that doesn't seem to be working at the moment : function ...
0
votes
1answer
56 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 ...
1
vote
1answer
240 views

Setting post meta data to random value during post status transition / on publish

Upon publishing an unpublished draft, I'd like the custom meta value "post views count" to be set to a random variable between 829 and 1013. I am using the code below, which doesn't always work. It ...
0
votes
1answer
114 views

How to define which register_post_status goes to which register_post_type?

New to registering post types but looking at samples, and the codex not helpful here. I am not understanding how the two of these relate? This is just bare bones so someone can explain (the parameter ...
0
votes
2answers
116 views

Changing a post status name

How do I change the status name "Trash" to "Archive". I don't want to change the functionality of the status or make a new status. I have tried Edit Flow custom status but I get some conflicts with ...
0
votes
1answer
163 views

How to update post status to draft if user role is "pending'

I'm creating a website where user pays to publish posts. If this user membership expires, the role changes from "Subscriber" to "Pending". I need a code that allows to update all posts to draft if ...
1
vote
2answers
707 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
80 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 ...
0
votes
1answer
73 views

In the Edit Post page how do I modify with jQuery the status select list?

Here is my JS: jQuery('#post_status option[value="draft"]').text('Approve'); I simply trying to modify the text inside the option element in the status select form element in the Edit Post page. ...
0
votes
1answer
281 views

Get new (not old) post inside transition_post_status hook

Following up the ticket 'transition_post_status' is executed before 'save_post', I'm still struggling how to access the new $post (after it has been saved) inside a transition_post_status hook. Right ...
0
votes
1answer
38 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 ...