How Do I Add a Shortcode to a Block in WordPress?

Adding a shortcode to a block in WordPress is simple. To add a shortcode to a block in WordPress, go to the block editor for the block you want to add the shortcode to. Once in the block editor, click the “Shortcodes” tab. On the Shortcodes tab, click the “Add New Shortcode” button. In the “Shortcode” popup window, type the following code into the “Shortcode” box: [my_shortcode] In the “Arguments” box, type the parameters you want the shortcode to accept. For example, if you want to create a shortcode that prints out the date, you would enter [my_shortcode date=”Wed, 06 May 2017″] in the “Arguments” box. To preview the shortcode, click the “Preview” button. To add the shortcode to your blog post, click the “Add to Post” button.

To remove the shortcode from your blog post, click the “Remove from Post” button. To change the name of the shortcode, click the “Change Name” button. To change the description of the shortcode, click the “Change Description” button. To change the icon of the shortcode, click the “Change Icon” button. To add a copyright notice to the shortcode, click the “Add Copyright” button. Click the “Save Shortcode” button.