Search

Shortcodes

Introduction ↑ Back to Top

Included in the WooFramework is a few custom shortcodes that you can use in all our themes. Shortcodes work in posts, pages and even widgets. For extensive overview on WordPress shortcodes you can check out the WordPress Codex.

How to use Shortcodes ↑ Back to Top

Shortcodes are added to any post, page or widget by simply adding the shortcode as shown in the examples below. Some shortcodes also have optional parameters so you can customize it even more.

When you go to edit a post or a page, you’ll find a Shortcode Generator button in the post editor window. This button allows you to insert any shortcode into your post or page.

The Woo Shortcodes Icon in the WYSIWYG page/post editor

You can also use shortcodes directly in your template files by using the do_shortcode() function. So if you wanted to add a FaceBook like shortcode in all your single posts, you would simply add this in single.php:

It’s important to use echo in front of the function if you want it to display.

Video Tutorial ↑ Back to Top

Buttons ↑ Back to Top

These CSS3 buttons look amazing in all modern browsers, and although they won’t look as amazing, they will still work in older browsers.

Optional arguments:
 - size: small, large
 - style: info, alert, tick, download, note
 - color: custom color (e.g red or #000000)
 - border: border color (e.g. red or #000000)
 - text: black (for light color background on button)
 - class: custom class
 - link: button link (e.g https://www.woothemes.com)
- window: true (open link in new window)

Colored Buttons

Button Button Button Button Button Button Button Button Button

Small and Large Buttons

Button Button Button Button

Icons Buttons

Button Button Button Button Button

Custom Button

Button

Info Boxes ↑ Back to Top

Info boxes are nice to use if you need to inform your site visitors of something in a more visual manner.

Optional arguments:
 - type: info, alert, tick, download, note
 - size: medium, large
 - style: rounded
 - border: none, full
 - icon: none OR full URL to a custom icon
This is an normal box
This is an info box
is is a rounded tick box
This is a note box
This is an download box
This is an alert box

Related Posts ↑ Back to Top

With this shortcode you can easily show related posts by tag. This only works on posts which have tags that exist on other posts.

Optional arguments:
 - limit: number of posts to show (default: 5)
 - image: thumbnail size, 0 = off (default: 0)

Social Buttons ↑ Back to Top

Twitter

You can easily add a the new Twitter button to your posts so you can share them on Twitter.

Source: http://twitter.com/goodies/tweetbutton

Optional arguments:
 - style: "horizontal", "vertical", "none" ("none" hides the counter - default: "horizontal")
 - url: specify URL directly
 - source: username to mention in tweet
 - related: related account
 - hashtag: optional hashtags to include.
 - size: optional size of the button (medium or large).
 - text: optional tweet text (default: title of page)
 - float: none, left, right (default: left)
 - lang: 'fr', 'de', 'es', 'js', 'hi', 'zh-cn', 'pt', 'id', 'hu', 'it', 'da', 'tr', 'fil', 'ko', 'sv', 'no', 'zh-tw', 'nl', 'ru', 'ja', 'fi', 'msa', 'pl' (default: english)
 - use_post_url: automatically retrieve the URL to the specific post (useful on archive screens)


Twitter Follow Button

You can easily add a Twitter Follow button to your website, to show off your Twitter follower count and encourage visitors to follow you on Twitter.

Source: https://dev.twitter.com/docs/follow-button

Arguments:
- username: Your Twitter username. This argument is required.

Optional arguments:
 - align: optional alignment of the button within the shortcode DIV tag container
 - count: show follower count (default is empty and true. Set to "false" to disable follower count)
 - float: none, left, right (default: left)
 - language: en, fr, de, it, es, ko, ja (default: english)
 - width: An optional width, in percentage (<strong>50%50px</strong>) format.
 - align: Used in conjunction with 'width' to align the button within the shortcode container DIV tag.
 - size: Specify the size of the button (medium or large)
 - show_screen_name: Optionally hide the display of your screen name on the button (set to "false").




Tweetmeme

You can easily add a Tweetmeme button to your posts so you can share them on Twitter.

Source: http://help.tweetmeme.com/2009/04/06/tweetmeme-button/

Optional arguments:
 - link: specify URL directly
 - style: compact
 - source: username


Digg

Digg buttons are a great way to submit your posts to Digg.com.

Source: http://about.digg.com/button

Optional arguments:
 - link: specify URL directly
 - title: specify a title (must add link also)
 - style: medium, large, compact, icon (default: medium)
 - float: none, left, right (default: left)


Facebook Like

Add a “like” button to your posts so visitors can like your story on FaceBook.

Source: http://developers.facebook.com/docs/reference/plugins/like

Optional arguments:
 - float: none (default), left, right
 - url: link you want to share (default: current post ID)
 - style: standard (default), button_count
 - showfaces: true or false (default)
 - width: 450
 - verb: like (default) or recommend
 - colorscheme: light (default), dark
 - font: arial (default), lucida grande, segoe ui, tahoma, trebuchet ms, verdana
 - locale: optionally add a locale to change the Facebook button's language (eg: de_DE for German or fr_FR for French)


Facebook Share

Add a “share” button to your posts so visitors can share your story on FaceBook.

Source: http://developers.facebook.com/docs/share

Optional arguments:
 - type: box_count, button_count, button (default), icon_link, or icon
 - float: none, left, right (default: left)


Google +1

Add a “+1″ button to your posts so visitors can show their friends that they like a post.

Optional arguments:
 - href: Optional specific URL to "+1". Takes the current URL if no URL is specified
 - size: standard, small, medium, tall
 - float: none, left, right (default: left)
 - annotation: none, bubble, inline (default: none)
 - callback: optional callback JavaScript function to run when the button is clicked
 - language: optionally change the language to one of the following supported languages: 
 -- Arabic
 -- Bulgarian
 -- Catalan
 -- Chinese (Simplified)
 -- Chinese (Traditional)
 -- Croatian
 -- Czech
 -- Danish
 -- Dutch
 -- English (US)
 -- English (UK)
 -- Estonian
 -- Filipino
 -- Finnish
 -- French
 -- German
 -- Greek
 -- Hebrew
 -- Hindi
 -- Hungarian
 -- Indonesian
 -- Italian
 -- Japanese
 -- Korean
 -- Latvian
 -- Lithuanian
 -- Malay
 -- Norwegian
 -- Persian
 -- Polish
 -- Portuguese (Brazil)
 -- Portuguese (Portugal)
 -- Romanian
 -- Russian
 -- Serbian
 -- Swedish
 -- Slovak
 -- Slovenian
 -- Spanish
 -- Spanish (Latin America)
 -- Thai
 -- Turkish
 -- Ukrainian
 -- Vietnamese


StumbleUpon Badge

Add a StumbleUpon badge to your posts so visitors can share your story on StumbleUpon.

Source: http://www.stumbleupon.com/badges/

Optional arguments:
 - design: The format to use to display the badge (horizontal_large (default), horizontal_medium, horizontal_small, icon_small, icon_large, vertical_count)
 - float: The position of the badge (left, right, none (default))
 - url: An optional URL to link to on the badge.
 - use_post: Use the most recent $post variable as the link (useful in archive screens when linking to each individual post). Alternatively, the current page URL is used.


Pinterest “Pin It” Button

Add a Pinterest “Pin It” to your posts so visitors can share your posts on Pinterest (featured images required).

Source: http://pinterest.com/about/goodies/

Optional arguments:
 - count: The format to use to display the counter (horizontal (default), vertical, none)
 - float: The position of the button (left, right, none (default))
 - url: An optional URL to link to on the button (defaults to current $post URL).
 - image_url: An optional image URL to link to on the button (defaults to current $post's image).
 - use_post: Use the most recent $post variable as the link (useful in archive screens when linking to each individual post).


LinkedIn Share Button

Add a LinkedIn share button to your posts so visitors can share your posts on LinkedIn.

Source: https://developer.linkedin.com/plugins/share-plugin-generator

Optional arguments:
 - style: The format to use to display the counter (none (default), top, right)
 - float: The position of the button (left, right, none (default))
 - url: An optional URL to link to on the button (defaults to current $post URL).


Horizontal Rule ↑ Back to Top

You can easily break up your text on a page or post by adding either a horizontal rule or a divider (same as hr only no border). See examples in the Columns section below.

Columns ↑ Back to Top

Columns are an easy way to style your post or page with multiple columns, from two columns to six columns. To divide text into columns, use any of the below shortcodes. Remember to use the *_last shortcode for the last column in the row.

The shortcode names use the following naming convention:

numberofcolumns_columnspan_last (_last is optional)

For example: the “twocol_one” shortcode, this is designed to be a single column of a two-column group. Additionally, the “fourcol_two” shortcode would be a column that spans 2 column areas, for use in a four-column group (as shown below).

Two Columns

twocol_one
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

twocol_one_last
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Three Columns

threecol_one
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

threecol_one
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

threecol_one_last
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Four Columns

fourcol_one
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

fourcol_two
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

fourcol_one_last
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Five Columns

fivecol_two
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

fivcol_one
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

fivecol_two_last
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Six Columns

sixcol_one
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

sixcol_two
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

sixcol_three_last
Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Quote ↑ Back to Top

Add a styled quote to your page or post and float it left or right with or without box.

Optional arguments:
 - style: boxed
 - float: left, right

Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Aliquam maecenas molestie nullam. Pellentesque risus diam vestibulum phasellus, aliquam vivamus, tempus urna habitant tempus a et, aliquam maecenas molestie nullam.

Icon Link ↑ Back to Top

Add a styled link with an icon

Optional arguments:
 - style: download, note, tick, info, alert
 - url: the url for your link
 - icon: add an url to a custom icon

You can go ahead and Download

Custom Lists ↑ Back to Top

With custom lists you can add nice icons instead of the normal list styling.

Optional arguments:
 - style: tick, red-x, bullet, green-dot, arrow, star

Typography ↑ Back to Top

We have some neat custom typography shortcodes that you can use on your content to style it differently: Dropcap, abbreviation, highlight and last but not least, custom fonts with all of the Google Fonts available at your fingertips! The shortcodes are easy to add in the shortcode generator in your post edit window.

 

This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.

Tab Layout ↑ Back to Top

With the tab layout, you can create your own tabs to hold lots of information without using a lot of real estate on your page.

Optional Arguments:
 - style: boxed
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Content Toggle ↑ Back to Top

With the content toggle, you can create your own toggle to hold hidden information which you can toggle to view.

Optional arguments:
 - title_open: The title text for when the toggle is open
 - title_closed: The title text for when the toggle is closed
 - hide: Hide the toggle box on load
 - display_main_trigger: Display the main trigger on the toggle
 - style: white
 - border: yes

Show the Content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Social Icon ↑ Back to Top

With the social icon, you can display links your social profiles with clean, tidy icons (you can even use your own icon!). If only the URL is specified, the shortcode will attempt to match your social profile URL with the appropriate icon, from a list of supported social websites (they are listed in the icon_url select box). More icons can be found here at IconFinder.

Arguments:
 - url: The link to your social profile. Specifying "feed" in this field will generate a link directly to your WordPress RSS feed.
Optional Arguments:
 - float: Optionally float the icon to the left or right.
 - icon_url: Optionally add a custom icon URL.
 - title: Optionally add a custom title for when the user hovers over your icon.
 - profile_type: Optionally specify the type of profile in use.

Contact Form ↑ Back to Top

The contact form allows for the creation of simple form-to-email solutions to create interaction with your website’s visitors. It’s also possible to add some custom form fields to this shortcode, which have been documented below.

Optional Arguments:
 - email: Use a specific e-mail address (the e-mail address listed under "Theme Settings" is used alternatively)
 - subject: A subject line for the e-mail.
 - button_text: Customise the text of the form's "submit" button.

As mentioned above, it’s possible to add some extra fields to this form. While this should not be used in excess, it is useful for adding one or two extra fields to your contact form. These are added as follows:

Text Input: text_fieldname="Text Field Label|Optional Default Text"
Select Box: select_fieldname="Select Box Label|key=value,key=value,key=value"
Textarea Input: textarea_fieldname="Textarea Field Label|Optional Default Text|Optional Number of Rows|Optional Number of Columns"
Checkbox Input: checkbox_fieldname="Checkbox Field Label|Value of the Checkbox|Checked By Default"
Radio Button Input: radio_fieldname="Radio Field Label|key=value,key=value,key=value|Optional Default Value"

Examples of each field type in use are shown below.

Default usage:

Text Field:

text_telephone="Your Telephone Number|021-555-5555"

Select Box:

select_besttime="Best Time To Call|morning=In the Morning,afternoon=In the Afternoon,evening=In the Evening"

Textarea:

textarea_additionalnotes="Optional Additional Notes|Place any additional notes here|10|20"

Checkbox Input:

checkbox_specialoffers="Subscribe to special offers?|Yes|yes"

* NOTE: Checkbox information will only be included if the checkbox is checked. If not, the opposite is assumed.

Radio Button Input:

radio_favouriteanimal="Favourite Animal|cat=Cat,dog=Dog,rabbit=Rabbit|dog"

Full example using the above fields:

Back to the top