I have a custom post type (called contacts). Since this post type is not working like a post, I don't want to show SAVE DRAFT, PREVIEW, Status, Visibility or Publish Date.

The only options I want to show are PUBLISH & Move to Trash buttons.

Is there a way to hide these other options? If not, how do I create a new PUBLISH & Move to Trash that I can add to a new metabox?

2 Answers 2


You can simply hide the options using CSS. This will add a display:none style to the misc and minor publishing actions on the post.php and post-new.php pages. It checks for a specific post type as well since all post types use these two files.

function hide_publishing_actions(){
        $my_post_type = 'POST_TYPE';
        global $post;
        if($post->post_type == $my_post_type){
            echo '
                <style type="text/css">
add_action('admin_head-post.php', 'hide_publishing_actions');
add_action('admin_head-post-new.php', 'hide_publishing_actions');
  • Brian - Thanks for the quick response. I tried the function, replacing 'POST_TYPE' with the name of the custom post type (contacts), but nothing is removed when I go the the edit/add new pages.
    – katemerart
    Commented Dec 11, 2011 at 3:27
  • Check out my latest edit. It should fix the issue. :) Commented Dec 11, 2011 at 3:49
  • That is brilliant - this has opened up a whole new way to remove stuff I don't want showing!! Thank you so much.
    – katemerart
    Commented Dec 11, 2011 at 4:13
  • Glad to help out :) Commented Dec 11, 2011 at 4:25
  • 1
    Just to point it out: you can remove a level of indentation for your code by simply doing if ( $post->post_type != $my_post_type ){ return; } at the beginning. No need to have the entirety of your code wrapped in the if statement.
    – Pete
    Commented Dec 27, 2016 at 23:27

In this example you can easily set on which post types you want to hide the publishing options, the example hides them for the build-in pots type type page and the custom post type cpt_portfolio.

 * Hides with CSS the publishing options for the types page and cpt_portfolio
function wpse_36118_hide_minor_publishing() {
    $screen = get_current_screen();
    if( in_array( $screen->id, array( 'page', 'cpt_portfolio' ) ) ) {
        echo '<style>#minor-publishing { display: none; }</style>';

// Hook to admin_head for the CSS to be applied earlier
add_action( 'admin_head', 'wpse_36118_hide_minor_publishing' );

Important update

I would also suggest you force a post status of "Published" to avoid saving posts as drafts:

 * Sets the post status to published
function wpse_36118_force_published( $post ) {
    if( 'trash' !== $post[ 'post_status' ] ) { /* We still want to use the trash */
        if( in_array( $post[ 'post_type' ], array( 'page', 'cpt_portfolio' ) ) ) {
            $post['post_status'] = 'publish';
        return $post;

// Hook to wp_insert_post_data
add_filter( 'wp_insert_post_data', 'wpse_36118_force_published' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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