Remove Save Draft & Preview Buttions.. and also Statius: Draft & Visibility: Public

I want to remove the entire section that says Save Draft, Preview and Status: Draft and Visibility: Public.

I want to not show it. Its ok if it is still fuctional.

Read More

Attached is the part I do not want to display.

Can someone show me how to do it?

Here is the area I want to not display:

http://kind.s3.amazonaws.com/removethissection.jpg

Related posts

Leave a Reply

2 comments

  1. You can hide them using CSS. Add this to the theme’s functions.php file, or add a plug-in header to the top of the file and zip it up to use as a plug-in:

    <?php
      add_action('admin_print_styles', 'remove_this_stuff');
      function remove_this_stuff() {
      ?>
    <style>
      #misc-publishing-actions, #minor-publishing-actions {
      display:none;
      }
    </style>
    <?php } ?>
    
  2. The above solution doesn’t work (returns error 500), but this one does:

    add_action('admin_head', 'leave_only_publish_button');
    
    function leave_only_publish_button() {
        if( !current_user_can('activate_plugins') ) { //doesn't affect users who can activate plugins, remove if needed
            echo '<style>
                #misc-publishing-actions, #minor-publishing-actions {
                display:none;
            }
        </style>';
        }
    }