Add a custom tab alongside Screen Options and Help

I changed my mind about “Most important: in the hook for validating updates, set-screen-option, pass the $value back if your plugin does not recognize the $option ! It’s probably for another plugin!” It’s better to go with what the hook suggest and send back $status (which is false) if you don’t know the $option. To … Read more

How to Remove Certain Screen Options and Table Columns from post type in wp_list_table?

What you need is to modify the $columns variable that is used during list display which you can modify using the ‘manage_posts_columns’ and ‘manage_pages_columns’ hooks for post_type=”post” and post_type=”page”, respectively. If you want to ignore custom post types you can inspect the 2nd parameter passed to ‘manage_posts_columns’ as I did in my example to show … Read more

How to Remove Certain Screen Options and Meta Boxes from add/edit post type?

What you need is in global $wp_meta_boxes indexed by get_current_screen()->id. Removing the screen options will also remove the metaboxes which you can do just before screen options are displayed using the ‘in_admin_header’ hook. So let’s assume you want to get rid of the “Send Trackbacks” screen option which you see in this screenshot: Drop the … Read more

Add screen options to custom admin pages

You don’t need to invent a new screen option row. Just use proper metaboxes. Currently, you are drawing pseudo-metaboxes: <!– Post status start–> <div class = “postbox”> <div class = “handlediv”> <br> </div> <h3 class = “hndle”><span><?php _e(“By Post Status”, ‘bulk-delete’); ?></span></h3> <div class = “inside”> <h4><?php _e(“Select the posts which you want to delete”, … Read more