2

I have a custom post type for events, and I wish to remove the Publish/Visibility options from the side as they are not relevant to the user.

Is there a way to do so?

2
  • 1
    How are they not relevant?
    – shea
    Dec 21, 2012 at 2:06
  • it will always be public and has dates the event will occur on set date ranges so no need to change the publish date either.
    – Keith
    Dec 21, 2012 at 2:10

1 Answer 1

10

WordPress provides the remove_meta_box() function exactly for this purpose:

add_action( 'admin_menu', function () {
    remove_meta_box( 'submitdiv', 'events', 'side' );
} );

The second parameter, events, will need to be replaced with the name of your custom post type.

1
  • I am not looking to remove the entire publish meta box. Only the visibility and the Publish immediately. I wish to keep the publish button and status options.
    – Keith
    Dec 21, 2012 at 20:42

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