WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

share|improve this question
up vote 1 down vote accepted

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 } ?>
share|improve this answer
    
Thank you! But I can't get it to work.. Also the contact form on your site doesn't work because I tried to email you. Please write back. – LucidDayDream Feb 7 '12 at 21:17
    
I fixed the contact form, thanks for the heads up. – Jeremy Jared Feb 7 '12 at 21:26

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>';
    }
}
share|improve this answer
1  
The code here seems to be valid PHP, but one has to be careful when doing copy/paste into functions.php regarding the opening <?php and closing ?>. – birgire Mar 11 at 10:07
    
The problem isn't in the opening and closing PHP tags for the code you linked. – Chris Trynkiewicz Mar 12 at 15:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.