Any way to change post/page status when editing page?

When editing a page, click on the cog wheel in the upper right corner to ensure the sidebar displays. There should be two tabs: Document and Block. Make sure Document is selected. There is an accordion item called Status & visibility, among Permalink, Discussion, and Page Attributes. If you click on Status & visibility to … Read more

retrieve post details in loop

First, change those = to === as mentioned by @sally-cj in the comment. On top of that, you’re saving the status as a variable called $stat and are then checking it as $status. So you might want to change $stat = get_post_status($job->ID); into $status = get_post_status($job->ID);. Or better: the $job is already populated with a … Read more

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. This can be achieved by storing a post meta value. You can do stuff on the post based on this meta value. by this publish post count will … Read more

wordpress post status inquery

That is called as Revision in WordPress. Whenever you update your post, the older content of that post is treated as Revision and a new record for revision is inserted in posts table. And we can check our revisions from Revision meta box. More detail : https://codex.wordpress.org/Revisions For – How to solve it to make … Read more

Workflow for attachments in WordPress

Here is how I realized a simple media workflow. Security checking and sanitizing is up to everyone. Based on WordPress version: 4.9.8 Create Attachment Post | Handle Media if (!empty($_FILES) && isset($_POST[‘postid’])) { media_handle_upload(“attachments”, $_POST[‘postid’]); } Post status pending is not possible for attachments when using media_handle_upload. For this case a filter needs to be … Read more

Force Custom Post Type Status to ‘Future’ on first Save or Publish

wp_insert_post_data filters post data just before it is inserted into the database. Documentation add_filter(‘wp_insert_post_data’, ‘schedule_post_on_publish’, ’99’); function schedule_post_on_publish($data) { $post_type = “event”; // Replace event with exact slug of your custom post type if ( $data[‘post_type’] == $post_type AND $data[‘post_status’] == ‘publish’ ) { $data[‘post_status’] = ‘future’; } return $data; } This may help.

error code: 523