How to Convert A WordPress Shortcode To A Gutenberg Block

Our friend Josh Pollock recently published a guide which I wish I’d written (and which I may yet, because it’s a good idea, and I’m sure going to be growingly-common question). It’s about how to go from a shortcode, which is that [square-bracketed] things of the past, to the Gutenberg-y thing of the future: blocks!

The process isn’t so hard, but I’d flail a lot if I set out to do it right away. That’s why guides like this one from Josh is so helpful: you can quickly read it over, and get a sense of the outlines of the Gutenberg-block from shortcode journey. It’ll help you if you ever make a WordPress block editor segment from scratch, or if you just want to do the conversion this guide covers.

1 Response


  • Hi, Is it possible to convert a shortcode content to html code programatically?.
    I now go to my post in the front end and copy the code and paste as html code by removing the shortcode block?. Could it be done automatically?. I have around 1000s of Posts. So it is very painstaking to do it manually.

Add a Comment

Your email address will not be published. Required fields are marked *