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?

1 Answer
1

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.

Leave a Reply

Your email address will not be published. Required fields are marked *