How to get a list of all WordPress Blocks in the Editor

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:

A screenshot of the Firefox console with a list of (most of) the blocks on this website.

A screenshot of the Firefox console with a list of (most of) the blocks on this website.

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.

How was it for you? Let me know on BlueSky or Mastodon

(Please) 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.

Related Posts

16 Mar 2019

The WordPress Block Directory

There has recently been a proposal to introduce a new type of plugin into WordPress. One specifically for editor blocks.I find this an interesting concept, and I can definitely see some benefits, but there are also some downsides. For starters;...
14 Jun 2020

WP Cafe – Developing Themes with Gutenberg

Last week I took part in the first WP Cafe with Keith and Mark from Highrise Digital. The subject was Gutenberg, the new WordPress editor, and talking about the work we have done with it.Below is the video from the...
22 Sep 2019

The End of WordPress Themes is in Sight

It’s been a long time coming.I currently earn a living selling WordPress themes. In a couple of years that won’t be the case. I might be earning something from themes, but themes as we know them will no-longer be made.In...
27 May 2013

WordPress: 10 Years Young, What Does The Future Hold?

WordPress is now 10 years old. I started using wordpress 9 years ago – which means I joined the WordPress community early on. The reason I chose WordPress is simply because of the fabled 5 minute install process – I...
14 May 2013

Redesigning the WordPress Post Editor

Ghost is a project born from frustration with WordPress. Ironically it seems to be mostly WordPress power users who want to use it. The Ghost team – led by John O’Nolan – put Ghost on KickStarter last week and it...
26 Aug 2016

My WordPress Wishlist

WordPress 4.6 has recently been released, and now plans are being made for WordPress 4.7. At the start of each new version the WordPress team ask for ideas and suggestions for areas people would like them to focus on. This...