New answers tagged draft
0
You can output the scheduled date for a draft post by reading the database using wpdb class through the global $wpdb variable provided by Worpdress (see http://codex.wordpress.org/Class_Reference/wpdb ).
Add this to your functions.php:
// function to get scheduled date for draft post
function unpublished_draft_date(){
global $wpdb; global $post;
...
1
This is very similar to this question.
We have to hook into check_ajax_referer to address the internal linking feature only. Then we register an action for pre_get_posts to extend the search to drafts and pending posts.
We will still get no pretty permalinks, because they are excluded in get_permalink. So we register a filter for that too and ask WordPress ...
0
In my drafts, $post->post_date_gmt is just 0000-00-00 00:00:00 – supertrue Jun 4 at 15:08
There is no way to edit the publish date of a draft that has not yet been published. The value for post_date_gmt will be 0000-00-00 00:00:00 until the post is published.
Make sure the post has been published at least once. Visibility may be set to private if you ...
0
It's not quite easy to deal with register_post_status yet, as it's not meant to be used within themes or plugins, but there is a nice plugin called Edit Flow which will do the job. Use the interface within the plugin to register your new post status and it will automatically appear in the dropdown menu beside your post.
You'll get the current status of ...
0
You can add a custom post status via register_post_status, but I'll warn you now that the API only half exists for this. You won't see any UI to allow you to set this status, you'll have to provide your own via a custom meta box, and you won't see anything on the back-end to allow you to filter on this status until you've assigned the status to a post.
Top 50 recent answers are included
