This added to the functions.php allows the removal of specific Gutenberg blocks.
function hide_default_blocks($allowed_block) {
$blocks = WP_Block_Type_Registry::get_instance()->get_all_registered();
unset($blocks['core/buttons']);
return array_keys($blocks);
}
add_filter('allowed_block_types_all', 'hide_default_blocks');
Part of the issue is that it is core/buttons
and not core/button
but also the method of removal was incorrect.
Related Posts:
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- Creating a Link Text like Submit Button in Admin Page
- Are block templates incompatible with serialize_blocks?
- How to access noticeOperations from withNotices
- WP Gutenberg Blocks – How to limit first/root blocks
- How to get boolean value from register_meta properly?
- How to only load css for used blocks on frontend
- Invalid hook call on save, not edit when using swiper slider
- Proper way to use useSelect
- Gutenberg blocks error: Each child in a list should have a unique “key” prop
- Pass custom props to
- Gutenberg text field validation
- Why isn’t custom sidebar panel not showing up in the Gutenberg Editor?
- How to get the path to the current theme?
- check if Gutenberg is currently in use
- How to use PanelColorSettings in custom Gutenberg block?
- What is an alternative method to the WordPress private _doing_it_wrong() function
- Update exisiting site to 3.5 release candidate
- How to save block attributes when the output doesn’t change
- How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
- Gutenberg ServerSideRender is deprecated, how to work with new wp.serverSideRender component?
- Get file headers in custom file
- add_filter and remove_filter added before and after wp_query
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- Having Problem On Getting WP Post Gallery Images URL
- How to: get main plugin/theme file?
- add_theme_support using a plugin
- How to bundle a plugin with a theme, or vice versa
- creating elements/innerblocks via rangecontrol
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- What is the difference between these two methods of writing $ instead of jQuery in WordPress [closed]
- Modify a Free Plugin available on wordpress.org & include with my Premium Theme? [closed]
- How to allow core Gutenberg blocks selection only when you are inside a custom inner block
- Saving data from block editor to the database
- Header Button Chance Polylang Elementor
- Best choice of options/settings framework for plugin/theme development
- Find source of notice / warning / errors efficiently
- Sharing common functionality (functions, template parts) between plugins and themes?
- Display content from custom post without modifying the single template
- Can I change header.php of current theme through a plugin function?
- Gutenberg Block showing invalid content on edit
- Gutenberg blocks not getting styled on back end
- Tried in different ways but sidebar not working?
- Is there a way to list all actions registered by a plugin or theme?
- Best way to save custom css for an block
- How to hook a custom user function to a wordpress core ajax action?
- How can I listen to events in Gutenberg block?
- It’s possible to passing a ref to FormTokenField from parent component using forwardRef?
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- Gutenberg: import dependency or assign from global variable?
- How developed with version control word press site on shared host? [closed]
- Following WordPress Markup Is mandatory, got awkward resultyby wordpress standard markup?
- How do I create plugin or theme using MVC pattern?
- PowerPress mobile media player
- How to Get Current Custom Post Type Associated Taxonomy Term
- Plugin templates vs Parent Theme
- Gutenberg table block with Bootstrap .table class
- How to add a gradient component to a custom block
- Can’t change the style of a submit input type? [closed]
- Make a plugin page out of influence of the theme’s style
- Custom entity search and display
- 400 Bad Request, in wordpress theme development, wp_ajax
- Issue on Setting $icon_url Parameter on WP add_menu_page()
- How to add template colors to custom block options in WordPress Gutenberg editor sidebar?
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- How to properly package a block plugin
- Save temporary registration data
- Setting a post’s category
- Modify custom block plugin without losing content
- Change the behaviour of a button
- Configuring Xdebug with docker compose
- When setting styles to an extended block that was saved as a pattern, it doesn’t remove the style that was there
- How to show comments from different Plugins to same post type?
- How to extend SelectControl with data from my theme
- Gutenberg block breaks when showing new data
- Redirection from a specific page for users logged in but not with membership
- Metabox types list
- Where to save Gutenberg plugin data?
- Gutenberg component in a plugin admin
- Add custom html classes to gutenberg wrapper
- How do I make two shortcode use the same id and increment it when I use them multiple times?
- Post Pagination does not working on WP-Query
- How to CRUD from wordpress database in wordpress theme?
- Caption Shortcode: what filter to change the image size?
- Font Awesome stopped showing icons, shows &# text instead [closed]
- Managing Custom Designed Content
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Generate activation url
- WordPress Beginer to Guru [duplicate]
- Saving multiple fields as array
- Invalid Menu Items
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Undo operation not working in Rich text [Gutenberg]
- how to catch a data from a array in WordPress
- How react js and other Javascript Technologies works on WordPress plugin?
- Add custom data-attribute to core Gutenberg block within an template
- Call API on post save/update and show the result in admin area
- Is there any other ways to replicating changes on live from staging without pushing from git
- Fetch Custom Woocomerce filed data and check the data avialble in Wp-user table as nicname or username using function.php