The post-status tag has no wiki summary.
0
votes
1answer
18 views
How can guest can view the “Pending Review” Post?
When user creat a new post it will be have "pending" status. So I want to visitor (guest - not logged user) can view "Pending" post and User can vote it to "Publish" if enough "X Votes". Google bot ...
1
vote
1answer
27 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 ...
0
votes
1answer
17 views
Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
I use WyPiekacz to set various conditions for authors when creating posts, for example checking if the post has a featured image or how many tags that are being used. It works fine.
However, these ...
0
votes
1answer
39 views
Schedule future post to custom post status instead of publish?
I've been doing some research into custom post statuses and scheduling posts and I had a question: I was wondering if it were possible to schedule a post to got from future to a custom post status ...
1
vote
1answer
86 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( ...
0
votes
1answer
76 views
Alternative to new_to_publish Hook for Custom Statuses
I am looking for the right hook to use for sending out an email notice when a post is inserted. However, I am using custom statuses (in this case 'holding') which doesn't seem to get hit with the ...
0
votes
1answer
157 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 ...
1
vote
1answer
59 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
votes
1answer
40 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 ...
0
votes
3answers
57 views
Showing posts for today and future
I'm using the following code to display posts with todays date or in the future... except the future part isn't working. If I take out the if statement then it shows all posts - in the past, present ...
1
vote
1answer
124 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
70 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");
}
...
0
votes
1answer
242 views
How to change post status in hook?
I have similar problem as described in How to trap "Publish" button to check for meta box validation?
Answer there is to hook into save_post and change post type. How can I do it?
I try to ...
1
vote
1answer
54 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 ...
0
votes
1answer
59 views
Check if post was modified by editor different than post author
Is there a way to check if a post written by user X is modified by a different user (for example admin, or an editor)?
What I want to achieve: I have a site where posts are submitted for publication ...
0
votes
1answer
57 views
Function is Missing an Action Hook
I have tied an action into a status change, which works on the backend. However,using a frontend button for updating post status does not trigger the ...
0
votes
1answer
519 views
Force Publish Future (Scheduled) Posts Immediately
I am trying to force publish 'future' or 'scheduled' posts, and I am having trouble
The reason I am asking is because I am creating a site that allows users to do the editing on the front of the ...
2
votes
1answer
157 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 ...
1
vote
1answer
65 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
3answers
167 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 ...
-3
votes
3answers
119 views
posts stuck as drafts
I've recently seen a new bug appear on a site running WP e-commerce. New products (or certain existing products) get stuck as 'drafts'. Once they are marked as draft clicking 'publish' does not do any ...
1
vote
1answer
496 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:
...
0
votes
1answer
70 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 ...
-1
votes
3answers
177 views
3
votes
1answer
128 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, ...
1
vote
0answers
176 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
117 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 ...
4
votes
1answer
90 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 ...
0
votes
1answer
134 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
162 views
Changing post status
Refering to Post status because it's not allowed to do a question on a answer ?!
Original post is from Bubka Gob and the answer came from Chris O .
I have add their code to functions.php:
...
4
votes
1answer
189 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 ...
2
votes
1answer
92 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',
...
1
vote
1answer
234 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 ...
0
votes
1answer
36 views
featuring old articles without messing up with the archive
This is all about featuring content in WP.
Say, you got 1000's of posts that you accumulated over the years and each has their own original ( and true ) post dates.
And now you want to feature them ...
1
vote
1answer
502 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 ...
2
votes
1answer
246 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', ...
0
votes
1answer
213 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 ...
0
votes
2answers
783 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' => ...
1
vote
2answers
172 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" ...
0
votes
1answer
130 views
Allow a subscriber to be an author and view only his post
I have recently upgraded from 2.9.2 to 3.3.1.
Im using the edit flow plugin to assign different status to posts and allowing users to register and create a post with a specific status.
In the previous ...
0
votes
1answer
403 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 ...
1
vote
1answer
106 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
265 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) | ...
0
votes
1answer
102 views
Change status of page after an event (Looking for best practice advice)
I'm looking for a best practice/ideas for modifying the status/data of a page after an event.
Here's an example of what I'm trying to accomplish - This WordPress site would allow users to sponsor ...
1
vote
1answer
731 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 ...
0
votes
1answer
52 views
Conditional tag-like function to tell if post is in trash?
What could I put in my theme to tell if a post is in the trash or not?
For example:
<?php if (is_trash) echo 'This post is in the trash!' ?>
0
votes
2answers
720 views
How do I modify this wpdb query to include posts that have a post_status of publish and draft?
I'm using the following function to count the number of posts an author has made from a custom post type.
<?php
function count_user_posts_by_type($userid, $post_type) {
global $wpdb;
...
1
vote
1answer
536 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 ...
5
votes
1answer
350 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 ...
1
vote
1answer
801 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.
...
