Remove title from custom post type edit screen
问题 How can I apply the remove_post_type_support('email_template', 'title'); only for post edit screen? The title should be available on create and not for edit. 回答1: In WordPress, there is one global variable to check on which screen we are and it is global $current_screen but problem is it can not be used with admin_init action. So alternatively we can use load-(page) action to achieve it. add_action( 'load-post.php', 'remove_post_type_edit_screen', 10 ); function remove_post_type_edit_screen()