Tagged Questions
1
vote
0answers
62 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");
}
...
2
votes
1answer
138 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
3answers
148 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 ...