Aarfie custom web development and maintenance services are discontinued – read more

Looking for our new Big Cartel themes – visit Aarcade

 
 

AARFIE SUPPORT

Shortcodes

For general instructions on the use of shortcodes see An Introduction to Shortcodes.

The following list is continuously being expanded as we add more tools to the Aarfie Platform.

Title (click for instructions) Description
[autodate] Displays the current date.
[clear] Clears alignment styles (float) of images or other elements creating a new line for the following elements.
[columns] Split content into columns.
[contactform] Inserts a contact form.
[donateform] Inserts a donation form.
[embed] Embed videos, images and other content into your post.
[gallery] Insert a thumbnail gallery of attached images.
[googlemap] Displays a Google Map for an address.
[hider] Show/hide content to decrease page length.
[imagelist] Display a list of attached images.
[latestexcerpt] Displays an excerpt of your latest post from your blog.
[latestpost] Displays the latest post from your blog.
[mytweets] Displays your latest tweets.
[padding] Clears alignment styles (float) and creates padding between the elements above and below the shortcode.
[paymentform] Inserts a general online payment form.
[prettycode] For displaying code within your content.
[publicinfo] Displays your public contact information.
[questionpop] Displays pop-up content to further clarify content.
[redirect] Redirects the visitor to an alternative URL.
[searchform] Displays a search form for your site.
[slideshow] Displays an animated slide show of attached images.
[socialshort] Displays your social network links.

[autodate]

Simplest Form

[autodate]

This shortcode will insert the current date in the default format set in Settings > General admin area.

Format

[autodate format="h:i a"]

Defines the format in which the current date will be shown. Valid values are any date formats allowed by the PHP date function.

To Top of Page

[clear]

Simplest Form

[clear]

This shortcode will clear any active alignment styles and create a new line for the content elements that follow.

This shortcode is typically used to correct messy content caused by multiple images with left or right alignment settings.

To Top of Page

[columns]

Simplest Form

[columns]

This is content in column one.

[column]

This is content in column two.

[column]

This is content in column three.

[/columns]

This shortcode will split the content within the opening and closing tags into columns. The content will be split wherever the additional shortcode [column] is placed between the columns tags.

Ratio

[columns ratio="1:3"]

This is content in column one.

[column]

This is content in column two.

[/columns]

Sets the ratio of column widths. In the above example, column two will be three times wider than column one. Valid values are any whole number ratio format (i.e. whole numbers separated by a colon). The default value is “1:1″.

The number of whole numbers in your ratio should match the number of columns you have created. For example, a valid ratio setting for four columns would be ratio=”1:2:1:2″. Extra whole numbers will be ignored and missing numbers will be set to 1.

To Top of Page

[contactform]

Simplest Form

[contactform]

This shortcode will insert a contact form. Submitted messages will be sent to the admin e-mail address set in the Settings > General admin area.

Title

[contactform title="Send us a note!"]

Sets the title of the contact form. Setting the title value to “none” will hide the title. Default value is “’Contact Your Site Name”.

Subject

[contactform subject="1"]

Setting subject to the value 1 will provide an extra field to enter the message subject. The default is no subject field.

Success

[contactform success="We'll be in touch soon!"]

Sets the message displayed after a message has been successfully submitted. The default value is “Thank you. If your message requires a response, we will be in touch with your shortly.”.

To Top of Page

[donateform]

Simplest Form

[donateform]

This shortcode will insert a donation form that will process donations via the PayPal account set in your Settings > Commerce admin area.

You can have your donation form pre-fill by taking the URL of the page or post where your form is located:

http://mysite.com/my-donation-page/

and adding suffix values:

http://mysite.com/my-donation-page/?don=10.50&rcr=M

You can send this link to a customer and, when they follow it, your donation form values will be automatically set to Donation Value: $10.50 to recur automatically every month.

Note that the suffix must be in the following format, and only the highlighted values should be changed to suit. Do not use spaces or complex characters in your values.

?don=10.50&rcr=M

You can set the rcr value to Y, M or W to have the donation recur yearly, monthly or weekly respectively. You can omit the rcr value for one-time donations:

?don=10.50

or set the rcr value to none to hide the recur option altogether:

?don=10.50&rcr=none

PayPal

[donateform paypal="sales@aarfiesx.com"]

Overrides the PayPal account associated with the donation form. Valid values are any PayPal account’s primary e-mail address. Default value is the PayPal account set in your Settings > Commerce admin area.

Title

[donateform title="Widget Service Payment"]

Sets the title of the donation form. Default value is “Donate to Your Site Name“.

Value

[donateform value="10.00"]

Fixes the donate value. Valid values are any positive numbers to two decimal places. This setting will render the donation value uneditable and will override any pre-fill value in the URL.

Recur

[donateform recur="M"]

Presets the recur value. Valid values are Y, M or W to have the donation recur yearly, monthly or weekly respectively. Set the recur to “none” to hide the recur option altogether. This setting will override any pre-fill value in the URL.

Address

[donateform address="1"]

Setting address to the value 1 will require the donator to enter an address to complete the payment. The default is no address required.

Note

[donateform note="1"]

Setting note to the value 1 will provide a field for the payer to send a note to you with your payment if they choose to. The default is no note field.

To Top of Page

[embed]

Simplest Form

The embed code allows easy-embedding of videos, images and other content into your post. In it’s simplest form, the embed shortcode does not even require the embed shortcode tags.

Check out this cool video:

http://www.youtube.com/watch?v=nTDNLUzjkpg

That was a cool video.

All you need to do to embed something into a post or page is to type the URL to it into your content area. Make sure that the URL is on its own line and not hyperlinked (clickable when viewing the post).

You can opt to wrap the URL in the [embed] shortcode.

Check out this cool video: [embed]http://www.youtube.com/watch?v=nTDNLUzjkpg[/embed]

That was a cool video.

This will accomplish the same effect, but does not require the URL to be on its own line. It also allows you to set a maximum (but not fixed) width and height, like so:

Check out this cool video: [embed width="123" height="456"]http://www.youtube.com/watch?v=nTDNLUzjkpg[/embed]

That was a cool video.

If the embed fails a hyperlink to the URL will be displayed instead.

Align

[embed align="left"]http://www.youtube.com/watch?v=nTDNLUzjkpg[/embed]

Sets the alignment of the embedded media. Valid values are “left”, “right” and “center”. These values create similar alignment results to the standard insert-image alignment settings. Default value is no alignment = left aligned with adjacent text above and below.

Supported Embed Services

To Top of Page

Simplest Form

[gallery]

This shortcode will insert a thumbnail gallery of images attached to the post as detailed in the support article How do I upload and insert images? The order of the gallery can be set as detailed in the aforementioned article.

Columns

[gallery columns="4"]

Sets the number of columns. The default value is 3.

ID

[gallery id="123"]

Sets the post ID. The gallery will display images which are attached to that post. The default behaviour if no ID is specified is to display images attached to the current post.

Size

[gallery size="medium"]

Sets the image size to use for the thumbnail display. Valid values include “thumbnail”, “medium”, “large” and “full”. The default is “thumbnail”.

Link

[gallery link="file"]

Set link to “file” for each image to link to the full size image file, which will be displayed in a pop-up light box. The default value links to the attachment page. Refer to the support article How do I upload and insert images? for more information.

Include

[gallery include="23,39,45"]

Set a comma separated list of attachment IDs to show only the images from these attachments.

Exclude

[gallery exclude="23,39,45"]

Set a comma separated list of attachment IDs to exclude the images from these attachments. Note that include and exclude cannot be used together.

To Top of Page

[googlemap]

Simplest Form

[googlemap]

This shortcode will insert a Google Map for the street address set in the Settings > Public Info admin area.

Address

[googlemap address="1027 NE Alberta Ave, Portland, Multnomah, Oregon 97211"]

Sets the address for which to display the Google Map, overriding the default look-up of site Public Info. Valid values are any address that yields a search result at Google Maps.

Width

[googlemap width="550"]

Sets the width of the map in pixels. Valid values are any whole number greater than 50. Default value is “400″.

Height

[googlemap height="300"]

Sets the height of the map in pixels. Valid values are any whole number greater than 50. Default value is “400″.

Zoom

[googlemap zoom="12"]

Sets the zoom level of the map. Valid values are any number from “0″ to “21″. Default value is “15″.

To Top of Page

[hider]

Simplest Form

[hider]
This is content that will be hidden by default.
[/hider]

This shortcode will hide the content within the opening and closing tags. The display of this content can then be toggled on and off by clicking the title text.

Title

[hider title="The Hidden Details"]
This is content that will be hidden by default.
[/hider]

Sets the title of the hidden content. Default value is “Show”.

To Top of Page

[imagelist]

Simplest Form

[imagelist]

This shortcode will look for images attached to the post that have an order value as detailed in the support article How do I upload and insert images? and display them in a simple list, i.e one image per line.

Size

[imagelist size="full"]

Sets the size of the listed images. Valid values are “thumbnail”, “medium”, “large” and “full”. The default value is “large”.

All Attachments

[imagelist all_attachments="1"]

Setting all_attachments to the value 1 will include all attached images in the list, even if they have not been assigned an order value.

Range

[imagelist range="3-7"]

Displays only the nominated range of images from the images attached to the post. The above example will display the 3rd image through to the 7th image.

Link

[imagelist link="http://shop.aarfiesx.com/"]

Defines a link URL for all images i.e. the location a visitor is taken to if they click any image in the list. Valid values are any absolute URL, don’t forget the http:// part of the URL or “full” which will link each image to its full size version. The default value is no link.

To Top of Page

[latestexcerpt]

Simplest Form

[latestexcerpt]

This shortcode will insert an excerpt from your latest blog post.

Title

[latestpost title="1"]

Setting title to the value 1 will display the post title. The default is no post title.

More Text

[latestpost moretext="Visit the blog"]

Sets the text for the link to your blog page. The default value is “visit the blog to read more →”.

To Top of Page

[latestpost]

Simplest Form

[latestpost]

This shortcode will insert the content of your latest blog post.

Title

[latestpost title="1"]

Setting title to the value 1 will display the post title. The default is no post title.

More Text

[latestpost moretext="Visit the blog"]

Sets the text for the link to your blog page. The default value is “visit the blog to read more →”.

To Top of Page

[mytweets]

Simplest Form

[mytweets]

This shortcode will display the latest 3 tweets from the Twitter account set in the Twitter URL field in the Settings > Social Network admin area.

Count

[mytweets count="5"]

Sets the number of tweets to display. Valid values are whole numbers from “1″ to “20″. The default value is “3″.

Replies

[mytweets replies="1"]

Setting replies to the value 1 will include reply tweets. The default is no reply tweets.

No Date

[mytweets nodate="1"]

Controls the display of the “time ago” link for each tweet. Valid values are “1″ = remove the “time ago” link or “link” replaces the “time ago” text with “link”. The default value is a “time ago” link to your tweet.

No Reply Link

[mytweets noreplylink="1"]

Setting noreplylink to the value 1 will include remove the reply-to-tweet link from each tweet. The default is to show the reply links.

To Top of Page

[padding]

Simplest Form

[padding]

This shortcode will clear any active alignment styles and create padding between the content elements before and after the shortcode.

Height

[padding h="30"]

Sets the height of the padding. Valid values are any whole number. The default value is “11″.

To Top of Page

[paymentform]

Simplest Form

[paymentform]

This shortcode will insert a general online payment form that will process payments via the PayPal account set in your Settings > Commerce admin area.

You can have your payment form pre-fill by taking the URL of the page or post where your form is located:

http://mysite.com/my-payment-page/

and adding suffix values:

http://mysite.com/my-payment-page/?val=1230.40&ref=768543

You can send this link to a customer and, when they follow it, your payment form values will be automatically set to Payment Value: $1,230.40 and Reference Number: 768543.

Note that the suffix must be in the following format, and only the highlighted values should be changed to suit. Do not use spaces or complex characters in your values.

?val=1230.40&ref=768543

PayPal

[paymentform paypal="sales@aarfiesx.com"]

Overrides the PayPal account associated with the payment form. Valid values are any PayPal account’s primary e-mail address. Default value is the PayPal account set in your Settings > Commerce admin area.

Title

[paymentform title="Widget Service Payment"]

Sets the title of the payment form. Default value is “Your Site Name Payment”.

Reference Title

[paymentform reftitle="Invoice Number"]

Sets the title of the payment form reference field. Default value is “Reference No.”.

Value

[paymentform value="145.45"]

Fixes the payment value. Valid values are any positive numbers to two decimal places. This setting will render the payment value uneditable and will override any pre-fill value in the URL.

Address

[paymentform address="1"]

Setting address to the value 1 will require the payer to enter an address to complete the payment. The default is no address required.

Note

[paymentform note="1"]

Setting note to the value 1 will provide a field for the payer to send a note to you with your payment if they choose to. The default is no note field.

To Top of Page

[prettycode]

Simplest Form

[prettycode]
<span style="color: red;">This is how we make text red</span>
[/prettycode]

This shortcode will format the content within the opening and closing tags to cleanly display code. This is the shortcode used on this page to display the coding examples.

Wrap

[latestpost wrap="1"]

Setting wrap to the value 1 will allow long code to wrap to a new line, instead of the default behaviour of overflowing and forcing a scrollbar for horizontal scrolling.

To Top of Page

[publicinfo]

Simplest Form

[publicinfo]

This shortcode will insert all of the public info set in your Settings > Public Info admin area.

Street

[latestpost street="1"]

Setting street to the value 1 will display only the street address from your Public Info.

Web

[latestpost web="1"]

Setting web to the value 1 will display your web site URL with your public info.

To Top of Page

[questionpop]

Simplest Form

..the start of a sentence[questionpop]A sentence is a set of
words that is complete in itself.[/questionpop] and the end
of it.

This shortcode will hide the content within the opening and closing tags and replace it with a help icon. When the help icon is clicked, the content will be displayed within a pop-up box.

The content should be plain text, however new lines can be created by typing ##.

..the start of a sentence[questionpop]A sentence is a set
of words that is complete in itself.##It might also be the punishment
assigned to a defendant found guilty by a court[/questionpop] and
the end of it.

Title

..the start of a sentence[questionpop title="Define: Sentence"]A sentence is a set of words that is complete in itself.[/questionpop] and the end of it.

Sets the title displayed in the pop-up content.

Width

..the start of a sentence[questionpop width="500"]A sentence is a set of
words that is complete in itself.[/questionpop] and the end
of it.

Sets the width of the pop-up content box in pixels. Valid values are any whole number greater than 100. Default value is “300″.

To Top of Page

[redirect]

Simplest Form

[redirect to="http://aarfiesx.com"]

This shortcode will redirect the visitor to the URL defined in the to value. The redirect will only occur when the singular page or post is visited.

To

[redirect to="http://aarfiesx.com"]

Sets the destination URL for the redirect. If an invalid URL is entered, the redirect will not take place. URL’s with a query component, e.g. http://aarfiesx.com?s=hello, will not validate / redirect.

Temp

[redirect to="http://aarfiesx.com" temp="1"]

Setting temp to the value 1 will define the redirect as temporary. This informs indexing bots (i.e. search engines, etc.) that the redirect will be removed in the short term and that they should return to the page to index content. The default is a permanent redirect.

To Top of Page

[searchform]

Simplest Form

[searchform]

This shortcode will insert a search form for your web site.

To Top of Page

[slideshow]

Simplest Form

[slideshow]

This shortcode will look for images attached to the post that have an order value as detailed in the support article How do I upload and insert images?

Size

[slideshow size="full"]

Sets the size of the slide show images. Valid values are “thumbnail”, “medium”, “large” and “full”. The default value is “large”.

Hide Controls

[slideshow hide_controls="1"]

Setting hide_controls to the value 1 will hide the slide show manual controls.

All Attachments

[slideshow all_attachments="1"]

Setting all_attachments to the value 1 will include all attached images in the slide show, even if they have not been assigned an order value.

Background

[slideshow background="#ffffff"]

Sets the slide show background colour. Valid values are “none” for no background or any valid colour name or colour hex. The default value is “#000000″ (i.e. black).

Align

[slideshow align="left"]

Floats the slideshow to the left or the right. Valid values are “left” and “right”. The default value is no float, center aligned.

Range

[slideshow range="3-7"]

Displays only the nominated range of images from the images attached to the post. The above example will display the 3rd image through to the 7th image.

Link

[slideshow link="http://shop.aarfiesx.com/"]

Defines a link URL for your slide show, i.e. the location a visitor is taken to if they click within the slideshow. Valid values are any absolute URL, don’t forget the http:// part of the URL. The default value is no link.

IMPORTANT: If you are linking to your shop, we recommend that you set your shop URL in the Settings > Commerce admin area. You can then enter “#shoplink” as the link value.

[slideshow link="#shoplink"]

Your slide show link will then be automatically updated any time you make a change to your shop URL in the Settings > Commerce admin area.

To Top of Page

[socialshort]

Simplest Form

[socialshort]

This shortcode will insert icon links to your social network pages set in the Settings > Social Network admin area.

Small

[socialshort small="1"]

Setting small to the value 1 will display smaller icons.

Manual Link URL’s

[socialshort facebook="http://facebook.com/my-facebook-page"]

Allows manual definition of social network links. Valid options are:

[socialshort rss="http://rss.com/my-rss-page"]
[socialshort newsletter="http://newsletter.com/my-newsletter-page"]
[socialshort facebook="http://facebook.com/my-facebook-page"]
[socialshort twitter="http://twitter.com/my-twitter-page"]
[socialshort tumblr="http://tumblr.com/my-tumblr-page"]
[socialshort flickr="http://flickr.com/my-flickr-page"]
[socialshort youtube="http://youtube.com/my-youtube-page"]
[socialshort vimeo="http://vimeo.com/my-vimeo-page"]
[socialshort skype="my-skype-name"]

To Top of Page

An Introduction to Shortcodes

Shortcodes allow you to quickly create complex content by typing a short and simple code. In some cases they are also used to display a global settings, e.g. [publicinfo] allowing future changes of these settings to be rolled out automatically to anywhere the shortcode has been used.

Shortcodes are always written as the shortcode name surrounded by square brackets. A basic example of shortcode might look like this:

This is a sentence I have written in my page or post content
introducing you to a gallery of thumbnails from a recent photo shoot.

[gallery]

Visitors will see a gallery of thumbnails in my published content above.

Some shortcodes support options to allow further control of their behaviour (note that multiple options can be specified at once, separated with spaces):

This is a sentence I have written in my page or post content
introducing you to a gallery of thumbnails from a recent photo shoot.

[gallery columns="2" size="medium"]

Visitors will see a gallery of thumbnails in my published content above.

Some shortcodes support or require content to work:

After this sentence I want to add a help icon that will pop up some
text when clicked [questionpop]This is the text that will
be displayed when someone clicks the help icon[/questionpop].

Note that shortcode content must be surrounded by the shortcode tags and the closing shortcode tag must have a forward slash before the name.

To Top of Page

Last Modified: 20th February, 2011