Shortcodes are are wordpress build in functionality to easily add codes into your wordpress posts and pages, without actually using code. As a security mechanism wordpress doesn’t allows you to enter some kind of code into the post editor.
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
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 result in a breaked shortcode.(“[bonus]Change this text however you like“ instead of “[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.
If you add a paremter like this
[postoptin headline="Here goes your headline"] you can customize the output, in this case the headline.
A parameter has 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
[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 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.
Inside Post Opt-in Box
You can use the
[postoptin] shortcode to create a optin form anywhere in your wordpress posts or pages.
This shortcodes accepts four 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
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.
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]
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
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.