7 thoughts on “How to get a list of all WordPress Blocks in the Editor Leave a comment

  1. Super useful, thanks! Do you know if there’s anything similar for Block Patterns?

    1. Thanks – glad it’s useful. I’m afraid I haven’t been able to work out anything similar to get a list of patterns.

  2. Hello , sorry for writing this here i hope you will answer me.
    I would like to ask about one of your old games Eridani \ Gunwing.
    Is there still any way to buy it or download it for free?

    Gun wing happened to me one of those childhood game demos that i wanted to buy but never could.
    Why isn’t it on the Binary Sun website like the others?

    I would give half a limb for a copy.

    thank you for your time and patience in advance.
    also please keep writing these tutorials are amazing.

    1. Hi Matthew – Eridani/ Gun Wing was made by another developer so I don’t actually have any ownership of it. As such I can’t give it away I’m afraid. Sorry about that.

  3. Hello. Thank you for this – it would be very useful to have a list of the blocks in play & their name spaces (for setting properties in theme.json as you noted).
    I feel like I must be doing something run here, though, as I’ve tried running `wp.blocks.getBlockTypes()` in both Chrome & Firefox and get the following:
    `Uncaught TypeError: wp.blocks is undefined
    debugger eval code:1`

    `Uncaught TypeError: Cannot read properties of undefined (reading ‘getBlockTypes’)
    at :1:11`

    Is there something obvious I’m doing wrong? (Your help & insight is appreciated, but in no way expected – I fully realize there are much better things you could be tending to.)

    1. Hi – I’ve just checked and it still works, so the thing to check is that you are doing this in the block editor. It will only work when the Gutenberg editor is loaded. If you’re doing that then I am not sure what the problem might be I’m afraid.

      1. THANK YOU, Ben! My apologies – it definitely does work! My mistake was that I was running this in the console on the frontend of the site (not within the Gutenberg editor/backend). Thank you for the clarification & for taking the time to check on this.

Leave a Reply

Your email address will not be published.