In order to remove a duplicate event type meta box while using Gutenberg editor, you need to follow the below mentioned steps:
- Open your child theme.
- Enter the following code in your functions.php file.
add_filter('rest_prepare_taxonomy','wpem_hide_event_type_metabox', 10, 2 );functionwpem_hide_event_type_metabox($response,$taxonomy)- {
if('event_listing_type'===$taxonomy->name ){$response->data['visibility']['show_ui'] = false;}return$response;- }