Gutenberg is coming and we need to be prepared for it. In this tutorial, we will learn how to create a block that will display a post. If you’re reading this before February, 19th 2018, be sure to join the webinar on building your first Gutenberg Blocks. Sign up at Preparing the Plugin For our own Gutenberg Block for Display a Post, we will use the npm package Create-Guten-Block from Ahmad Awais. You will need to have npm and node installed on your machine. If you don’t have them, check this site and follow their install instructions. Also, install the package create-guten-block by typing npm install create-guten-block --global so you can access it in any folder. Since I will use that package, I don’t need to create a base of my plugin. Everything is done from there. I only have to place myself inside the plugins folder of my WordPress site (through the command line/terminal) and type create-guten-block guten-load-post. This will create a plugin guten-load-post. Once it’s installed just place yourself inside that folder with cd guten-load-post and then start it by npm start. You’re good to go for developing your own block. Files The
Share This