How to Add Shortcodes in a WordPress Post or Page

>How to Add Shortcodes in a WordPress Post or Page
  • How to Add Shortcodes in a WordPress Post or Page

Shortcodes are WordPress-specific codes which allow you to easily embed content into your posts or pages. Think of it as a shortcut.

Some beginners, as we recently encountered, could get confused on how to exactly add them. Therefore, I decided to write a short article in order to show you how to do it.

Adding a shortcode to a post or page

Most plugins use shortcodes. You create the content with the plugin, and then use the shortcode that it generates to add that content where you want to.

For my example, I’ll use the well-known plugin, Contact Form 7.

After I’ve created a form and saved it, a shortcode was generated.

Different plugins generate different shortcodes, so they won’t all look like in my example.

I’ve selected the entire shortocode, including the brackets “[]”, and copied it. Now I’ll go to my desired page and paste it.

contact form 7 shortcode

I’ve created a simple contact page and pasted the shortcode there.

How to add shortcodes to WordPress

I pasted the code in the Text editor because I’m usually using that, but you can paste it in the Visual editor too.

Let’s see if my contact form was added to the page.

Contact form WordPress

Yep, the contact form is there. It’s as simple as that.

Shortcodes in widgets

Even though some shortcodes work in widgets, WordPress doesn’t support shortcodes there by default. The good news is that you can enable shortcodes to work in widgets by adding a simple code.

That’s a wrap

Hope you found the post useful and comprehensive.

If you have any thoughts or questions, leave a comment, contact us, or message us on Facebook.

Don’t forget to share the info with your friends too!

WP Rocket - WordPress Caching Plugin
By |2018-10-21T14:42:30+00:00May 17th, 2017|WordPress|3 Comments


  1. Yorum Kalemi October 24, 2017 at 11:38 AM - Reply

    I’ll try it thanks for sharing.

  2. Kapil Garg December 28, 2017 at 1:30 PM - Reply

    Thanks for sharing …. Very helpful for me………

  3. michael August 5, 2018 at 2:31 AM - Reply

    I was looking all over the web for this information. thank you

Leave A Comment


- Get guides and offers right into your inbox -

The type of emails that you would like to receive (multiple selection allowed):

You can unsubscribe at any time by clicking the link in the footer of the emails. For more information, please check the privacy policy.

I use MailChimp as my emailing service. By subscribing, you understand that your email and preferences will be transferred to MailChimp. Learn more about MailChimp's privacy practices here.