How to Add a Shortcode in WordPress (Quick Guide)

add a shortcode

Adding dynamic content in your WordPress posts/pages is very easy if you consider to add a shortcode. All you have to do is place code inside your page/post, and your dynamic content will be ready. There are many themes and plugins in WordPress that use shortcodes to add galleries, sliders, contact forms, and more.

Using WordPress shortcode is very easy, in this post I will show you how to add your own shortcode in WordPress. But before add a shortcode, it is essential to know about shortcode WordPress. 

What is ShortCode in WordPress?

When WordPress finds any shortcode, it automatically runs the code associated with it. 

Now, let’s check out how to add a shortcode in WordPress. 

Add a Shortcode in WordPress Post/Page

To add a shortcode to your WordPress post/page, you need to have a plugin that works with shortcodes. There are a lot of plugins that work with shortcodes, like WP Table Builder, Contact Form 7, WP Call button, OptinMonster, etc. 

After you install any plugin that will provide you with a shortcode, copy the code. 

Step #1: Add a Shortcode Block

Create a new post/page or edit the existing one, in which you want to add a shortcode. Now click on the add block (+) button and insert a shortcode block

Type ‘shortcode’ in the search bar and the shortcode block will appear.

Step #2: Paste The Shortcode

After adding the shortcode block, paste the shortcode in the block. 

Now save the post/page and preview the changes that shortcode has brought. 

Add Shortcode in WordPress Widget

Shortcodes also work great with WordPress widgets. To add a shortcode in WordPress widget, go to Appearance -> Widgets page. 

Now click on the add block or plus icon from the below. Search for “shortcode” block and insert it by clicking on it.

Paste your shortcode and click the ‘Update’ button from the top left. 

Now visit your WordPress site and check the changes live. 

Final Words

I hope you have learned how to add a shortcode in WordPress with the help of this post. If you like this post, please consider sharing the post. Don’t forget to share your thoughts, and I will be happy to reply to you.

Was this helpful?

Thanks for your feedback!

Leave a Reply

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

Introducing New Table Block Plugin - Tableberg

X
Need help?