function plt_hide_coblocks_menus() { //Hide the "Appearance → Block Patterns" menu. remove_submenu_page('themes.php', 'edit.php?post_type=coblocks_pattern'); } add_action('admin_menu', 'plt_hide_coblocks_menus', 15);
Where do I put this code?