/**
* Disable display of Gutenberg Post Setting UI for a specific
* taxonomy. While this isn't the official API for this need,
* it works for now because only Gutenberg is dependent on the
* REST API response.
*/
add_filter( 'rest_prepare_taxonomy', function( $response, $taxonomy ){
if ( 'post_tag' === $taxonomy->name ) {
$response->data['visibility']['show_ui'] = false;
}
return $response;
}, 10, 2 );
In WP 5 with Gutenberg
remove_meta_boxdoesn't seem to have any effect anymore.The following workaround from WordPress/gutenberg#6912 (comment) might temporarily fix this. I slightly adapted it to hide the
post_tagmetabox instead of thecategorymeta box from the original snippet.