WordPress capabilities on pending post status
WordPress capabilities on pending post status
WordPress capabilities on pending post status
Restrict edit, but allow preview for custom post status
You can use the answer given here: How to add a quicklink to the Posts Admin Published|Scheduled|Trash menu For e.g. Stephen Harris answered the same question to add an extra menu item for displaying today’s posts. add_filter( ‘views_edit-post’, ‘wpse_add_my_view’); function wpse_add_my_view($views){ global $post_type_object; $post_type = $post_type_object->name; $y =mysql2date(‘Y’, current_time(‘mysql’) ); $m =mysql2date(‘m’, current_time(‘mysql’) ); $d … Read more
I used URL parameters and created a specific function called at init: add_action( ‘init’, ‘publish_post_status’ ); function publish_post_status($post_id){ if (isset($_GET[‘publish’]) && current_user_can(‘publish_posts’)) { if ($_GET[‘publish’] == “true”) { $current_post = get_post( $_GET[‘post_id’], ‘ARRAY_A’ ); $current_post[‘post_status’] = ‘publish’; wp_update_post($current_post); } } if (isset($_GET[‘queue’])) { if ($_GET[‘queue’] == “true”) { $current_post = get_post( $_GET[‘post_id’], ‘ARRAY_A’ ); $current_post[‘post_status’] … Read more
How to change custom post type status when non-admin updates post?
They don’t do this. Custom post statuses are basically a trap. They seem like they might make sense, but likely they won’t do what you think they will do and cause ton of grief with edge cases on top. You should consider custom taxonomies for your CPT–specific data. They are much more robust and safe … Read more
Add custom post type drafts to RSS feed
There is not a way, but it may be on track as being a feature in WordPress in the future. https://core.trac.wordpress.org/ticket/23168 WordPress currently depends on the core statuses, even if you hide them. Woocommerce, for example, has its own statuses for its custom post types, but they still depend on “draft” etc. I needed this … Read more
How to use same page template if post status other than ‘publish’?
Posts and Attachments with “Published” status in Search