Select Page

whatarewordpressshortcodesWhat are WordPress Shortcodes?

WordPress shortcodes are special “codes” that give WordPress some instructions.

Maybe you’re familiar with “shortcuts” in Microsoft or Mac programs – like “Ctrl + B” – which means holding the Control key on a Windows computer while hitting the B key – tells your word processor to turn the text to Bold.

Shortcodes do the same thing except they relate to WordPress and the web.

Take a look at this example. Contact Form 7, the most popular contact form plugin for WordPress, uses shortcodes.

shortcodes

The Contact Form 7 plugin basically takes care of designing a form for your website where people can contact you via email. Now ordinarily, it would be hard to write the code for this kind of form. But Contact Form 7 takes care of it for you.

However, the one thing that the Contact Form 7 plugin cannot do is figure out WHERE you want the form – do you want it on a Contact Us page? Or do you want it on your Home page?

So once you have your contact form ready, Contact Form 7 gives you a “shortcode” that you simply can place on whatever page or post where you want the form to appear.

Here’s what the shortcode looks like:

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

    When you paste this shortcode into the ‘text editor’ view on WordPress content editor on a page or post, then click to Publish or Update your page or post, you will see that a form now appears.

    So the shortcode basically is just a friendly-to-use snippet that tells WordPress where you want the form and which form you are referring to in this case.

    Many plugins use shortcodes. The plugin does the work of creating something complicated and they give you a shortcode so you can easily place it wherever you want on your website.

    The WordPress content editor also comes with a few built-in shortcodes – and these are similar to the shortcuts you might know from word processors.

    For example, you can highlight text and hit Ctrl+B or Ctrl+I to Bold or Italicize text.

    Less known shortcodes in WordPress include the # sign which tells WordPress to format text as Heading.

    For example,

    # Use this for Heading 1
    ## Use this for Heading 2
    ### Use this for Heading 3

    Instead of having to write your headlines, then select the text, then go to the dropdown menu in the toolbar and change the format to Heading, you can just use the # key.

    By the way, would you like more useful tips and tricks for WordPress? I’m giving away my WordPress Quick Start free and you can download your copy by clicking here.