Early on in the development of the new Gutenberg editor I asked how to get a list of all the blocks available in the new editor, then today Keith Devon asked how to do it on Twitter. So I thought I would post the answer here.
To get a list of all the WordPress Blocks currently available in your Post/ Page editor you should open up the browser console and then enter the following:
wp.blocks.getBlockTypes()
The output looks something like this:
This will list all blocks, the core ones, and the ones added by plugins. It’s particularly handy for WordPress plugin developers, but will also be useful when setting properties in theme.json
a new feature that is part of the upcoming Full Site Editing functionality of WordPress.
Was it good/ useful/ a load of old rubbish? Let me know on Mastodon, or BlueSky (or Twitter X if you must).
Link to this page
Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.