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.
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.
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
- Tweet this box
- Share Buttons
- Download Button for Post Specific Bonuses
- Inside Post Opt-in Box
- Post Specific Bonus Notification Box
- Author Byline Link
- Content Boxes
Types of Shortcodes
There are two types of shortcodes. The first ones are self closing like this:
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.
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:
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] 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.
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:
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:
This shortcodes accepts five different parameters:
[postoptin headline="Your custom headline"]You can use a complete custom value for the headline
[postoptin text="Your custom text"]You can use a complete custom value for the text
[postoptin cta="Your custom CTA"]You can use a complete custom value for the text of the call to action button
[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.
If 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:
This shortcode has two parts. The first one is the text between
[/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]
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
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]
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.
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.