I do a lot of WordPress dashboard customization—and I still can’t stand the block editor.
When tools like Elementor and Visual Composer are powering the vast majority of builds (something like 80–90%), the Customizer along with the Block and Patterns menus feel completely out of place in a tailored admin experience. They just sit there, cluttering things up and breaking the flow of an otherwise clean, purpose-built dashboard.
And of course, the code to hide them seems to change every other release. So this is basically a note to myself about which workaround actually works this week—another unnecessary bit of trivia I shouldn’t have to keep relearning.
function remove_menus_appearance_patterns(){
// Appearance > Patterns
// uses '?p=pattern' in WP versions from 2025+
remove_submenu_page( 'themes.php', 'site-editor.php?p=/pattern' );
// older WP versions may need one of these instead
remove_submenu_page( 'themes.php', 'site-editor.php?path=/patterns' );
remove_submenu_page( 'themes.php', 'edit.php?post_type=wp_block' );
}
add_action('admin_menu', 'remove_menus_appearance_patterns');