Custom block not showing in "insert block" list
-
Hello and thanks for the support.
The custom blocks I’ve defined in my plugin stopped showing in the “insert block” menu. The code has worked before but no longer showing after WordPress update.
The custom block (called
hmslhf/hmslhf-accblock-script) is defined exactly as described in the Gutenberg handbook: a function in the pluginindex.PHPfile usingwp_enqueue_scriptandregister_block_type, and the corresponding JavaScript methodsregisterBlockTypein the respective JavaScript file (calledaccblock.js).There is no visible reason for the custom block to not show in the
insert blockmenu in new site pages. The debugger shows that the PHP functions run without errors. Chrome’sinspectlist of sources shows that the JS source file is loaded without errors. Yet there’s no way I can insert the custom block to new pages.I enclose the code below but the code has worked before. What could be the reason for not showing the custom block? Could WP version 5.6 fail to show custom blocks?
Ruling out the following problems:
- The custom block’s category was changed from ‘common’ to ‘TEXT’ and to an empty string
- A new WordPress page was created and reloaded several times immediately after loading the plugin
Your advice would be most appreciated.
-
Hi there,
It looks like you’re in the wrong forum. It appears that you’re using the open-source WordPress software and therefore you need to seek help at these forums:
https://wordpress.org/support/forums/
These forums are for WordPress.com hosted sites only. If you want to know more about the differences between WordPress.com and the WordPress software you can read this document:
- The topic ‘Custom block not showing in "insert block" list’ is closed to new replies.