Shortcodes are are wordpress build in functionality to easily add codes into your wordpress posts and pages, without actually using real PHP or HTML code.

If you are not familiar with shortcodes yet, than you should check out these two excellent articles from WP Beginner on What is a Shortcode and 7 essential tips for using shortcodes.

The Growtheme provides shortcodes to create opt-in forms anywhere on your page, to include share buttons and download buttons on the thank you page, to work with post specific bonuses and a few more.

Tip

All shortcodes are defined in the “Growbox” Plugin. This way you can be sure that no functionality is lost if one day you wish to use a different theme.

You have the following Shortcodes


Types of Shortcodes

There are two types of shortcodes. The first ones are self closing like this: [download].

It has only one part, doesn’t includes any content and doesn’t have any parameters.


The second type are enclosing shortcodes, like this one:[bonus]This is the content of the shortcode[/bonus].

You will see that the second one has a opening part ([bonus]) and a closing part ([/bonus]). The opening part says wordpress where the content inside the shortcode begins and the closing part says where it ends.


The shortcodes have to remain always the same and are case sensitive. [Bonus] (capitalized) won’t work if the shortcode is [bonus] (uncapitalized). The same is true for the type. If a shortcode needs a opening and closing part, just using the opening part will give you unexpected results.

For Example:

Wrong use with  missing closing tag: [bonus]Change this text however you like

Right use with closing tag: [bonus]Change this text however you like[/bonus]


Some shortcodes accept parameters to customize the output of the shortcode. So for example using the [postoptin] shortcode without any parameters will make use of the default Inside Post Optin Options you have setup within the WordPress Customizer.

If you add a parameter like this [postoptin headline="Here goes your headline"] to your shortcode, you can customize the default output, in this specific case the headline.

A parameter has always a name and a value. The name is defined by the shortcode itself, you use it like this: headline=""

The value is either predefined or you can give it a custom value. It is the part between the double quotes. So to add a value to the headline parameter you would use it like this (inside the shortcode) headline="Your custom value"


Tweet this box

To insert a tweet this box just use the Following Shortcode or click on the Twitter Icon within your WordPress Post Editor Toolbar:

[tweet]The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since.[/tweet]

You can customize the part between [tweet] and [/tweet] to anything you want. If it is larger than 160 characters twitter will trim down the text automatically. If you have set up your Twitter username in the general-options a via @username will be appended to your tweet.

The Twitter Shortcode makes use of the post authors gravatar image. You can change your Gravatar Image registering on gravatar.com using the same email you use with your wordpress installation.

_images/tweet-this.jpg

You can use a different style if you add the class="full" attribute to your shortcode so it reads like this:

[tweet class="full"]Here goes the text you want to tweet out[/tweet]

This is how it will look like:


Share Buttons

You can use the [share] shortcodes to create facebook and twitter share buttons of you blog home URL.

Tip

This shortcode is best used on the “Thank You” Page.

_images/share-buttons.jpg


Download Button for Post Specific Bonuses

The [download] shortcode will only work on your “Confirmation” Page and “Thank You” Page. It shows a Download Button in case a user has opted in to your email list through a post specific bonus.

You can learn here how to Set up a Post Specific Bonus.

_images/download-button.jpg


Inside Post Opt-in Box

You can use the [postoptin] shortcode to create a optin form anywhere in your wordpress posts or pages or just click on the icon within your wordpress editor toolbar:

_images/inside-postoptin.jpgThis shortcodes accepts five different parameters:

headline=””
[postoptin headline="Your custom headline"] You can use a complete custom value for the headline
text=””
[postoptin text="Your custom text"] You can use a complete custom value for the text
cta=””
[postoptin cta="Your custom CTA"] You can use a complete custom value for the text of the call to action button
animate=””
[postoptin animate="yes"] or [postoptin animate="no"]
form=””
[postoptin form="12345"] If your email marketing provider supports funneling subscribers into different forms you can use this parameter to specify the form ID you want to save subscribers to.

_images/inside-postoptin-parameters.jpgIf you need more info checkout the Inside Post Optin Options.


Post Specific Bonus Notification Box

If you have Set up a Post Specific Bonus you can use the [bonus][/bonus] shortcode inside your post to create a notificationbox or just click on the Icon within your WordPress Post Editor Toolbar:

_images/post-specific-bonus-notification-box.jpgThis shortcode has two parts. The first one is the text between [bonus] and [/bonus]. You can set it to anything you want, so for example:

[bonus] Exclusive Bonus: Click here to download something extremely valuable that cost me months to create [/bonus]
This will define the text that goes inside the notification box.

The second part is the text you want to use as a link to open the opt-in popup. You can simply wrap the text you want to use as a link between [link] and [/link].

So you would only need to adjust the above example like this:
[bonus] Exclusive Bonus: [link] Click here to download [/link] something extremely valuable that cost me months to create [/bonus]

Tip

As long as you are inside the same post where you have Set up a Post Specific Bonus you can use the [link][/link] shortcode to link any text to the post specific bonus.

Note

Currently it is not possible to use post specific bonuses outside of the post where you have Set up a Post Specific Bonus. So you can’t link to the opt-in box of a post specific bonus outside the post itself.

_images/post-specific-bonus-notification-box-parameters.jpg