This works for me:
// Remove WP Block
add_action('admin_init', 'remove_wp_block_menu', 100);
function remove_wp_block_menu() {
remove_submenu_page( 'themes.php', 'edit.php?post_type=wp_block' );
}
Related Posts:
- add_role menu pages are not visible
- Displaying the number of updates available in the Admin area
- Remove a menu item created by a plugin
- How to remove Customize from admin menu bar after WP 4.3
- Modify Admin Bar Link
- Run functions only in the admin area?
- Apply custom role capabilities to administrator (without plugin)
- Roles & capabilities GUI that does not create separate table
- Set image size on media and text block with a function
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- difference between add_object_page and add_menu_page
- Remove Menu Page Giving Error
- Print Dashboard menu name and link
- How to specify which Gutenberg blocks are available in the editor for a page template
- Why is my Gutenberg block returning an error after initial save?
- Logout hyperlink within a sub-menu
- Access / Filter block variations in Gutenberg, in WordPress 5.6
- Add Featured image column into wordpress admin on pages AND posts
- Change position of media in admin menu
- Move ‘current-menu-item’ class on #adminmenu li from Posts to Pages for Taxonomy Edit Screen
- Creating A New Admin Menu Tab For Theme Options
- Custom editor color palette colors are not appearing in the editor
- How to add custom JavaScript in functions?
- Add php code to wp_print_scripts?
- Function not working inside of a function in functions.php
- How to keep the capability of users and disable Gutenberg editor in WordPress?
- how to make has_block() see inside blocks too
- The Capability to choose post/page template
- How to change a specific admin label
- Adding custom social icons to the social media icon block in the Gutenberg editor?
- Pass URL to iframe in WordPress Block
- Customizing the wp_video_shortcode output with add_filter
- large image size of 1440×1440 not pulling 2x of 2880×2880 image
- How to add publish/draft button in Admin Post Lists
- Which method is more correct for removing WooCommerce Extensions menu item?
- Hide certain post types from editors
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- Function Reference for custom link in Admin Menu Management Page
- How to get postId from the argument $block when register_block_type()?
- Problem with lists and “allowed_block_types” in functions.php (since WP 6.1.1)
- list all gutenberg blocks properties with icon name as well
- Override categories with Pages (block theme)
- How to force Cover block to use the full size image resolution
- Missing feature image link function
- What’s the difference between home_url() and site_url()
- Remove “Category:”, “Tag:”, “Author:” from the_archive_title
- get_template_directory_uri pointing to parent theme not child theme
- How to customize the_archive_title()?
- Changing Admin Menu Labels
- remove empty paragraphs from the_content?
- What is the “with_front” rewrite key?
- Why use if function_exists?
- How to override parent functions in child themes?
- wp_enqueue_script was called incorrectly
- Add multiple custom fields to the general settings page
- Ajax call always returns 0
- 400 bad request on admin-ajax.php only using wp_enqueue_scripts action hook
- How long does a deprecated function live in core?
- Solution to render Shortcodes in Admin Editor
- How to add a data attribute to a WordPress menu item
- What’s the difference between esc_html, esc_attr, esc_html_e, and so on?
- remove_action on after_setup_theme not working from child theme
- plugins_url vs plugin_dir_url
- Remove type attribute from script and style tags added by WordPress
- How to run a function every 5 minutes?
- Best way of passing PHP variable between partials?
- Upload Multiple Files With media_handle_upload
- How to display custom field in woocommerce orders in admin panel?
- Passing arguments to a admin menu page callback?
- Adding fields to the “Add New User” screen in the dashboard
- Issues with title-tag and document_title_parts
- How do I get the current edit page ID in the admin?
- How to check if a user exists by a given id
- Why isn’t is_page working when I put it in the functions.php file?
- Add tags to the section via functions.php
- Add image size if page template
- How to create a custom order status in woocommerce!
- Remove Actions/Filters added via Anonymous Functions
- Adding a second email address to a completed order in WooCommerce [closed]
- How to load parent_theme functions.php before child_theme?
- How to load scripts/styles specific for a page
- Programatically add options to “add new” custom field dropdown
- Is there any global functions.php file which works for any theme?
- Excluding iPad from wp_is_mobile
- When should you, and when should you not, use wp_list_pluck()?
- Get the ID of the page a menu item links to?
- Add container to nav_menu sub menu
- Difference between the_permalink() and get_permalink() function
- What’s the difference between WordPress random_int() and PHP built-in function random_int()?
- Child theme – Overriding ‘require_once’ in functions.php
- Link to user’s profile settings page?
- WordPress Enqueue for homepage only, functions.php, wp-framework
- get php variable from functions php and echo it in theme template files [closed]
- Get menu object from theme_location
- Is it ok to use a function to output the text domain name in a wordpress theme
- Trying to use add_action and do_action with parameters
- Use AJAX in shortcode
- Set JPEG compression for specific custom image sizes
- Can the new 4.8v text widget visual editor be removed?
- Prevent “main” WPMU site_url() being returned in functions