fbpx

Shortcodes

Button shortcode: [button][/button]

Available attributes

Examples

A button to CSSIgniter A button to CSSIgniter A button to CSSIgniter

[button url="https://www.cssigniter.com" size="large"]A button to CSSIgniter[/button]

New window to Google New window to Google New window to Google

[button url="http://www.google.com" target="_blank" scheme="red"]New window to Google[/button]

Download now Download now Download now

[button size="small" scheme="pink" border_color="#c9054f" border_width="2px" icon="fa-download"]Download now[/button]

Refresh Refresh Refresh

[button scheme="green" fg_color="rgb(10, 20, 30)" icon="fa-refresh" spin]Refresh[/button]

Rounded Rounded Rounded

[button icon="fa-spinner" corners="5px" spin]Rounded[/button]

Compatibility with pre-v2.0 versions

The button shortcode used to accept a type and color attributes that are now deprecated. Valid values for those attributes were:

  • type – Any one of: download, check, envelope, cancel, cart. Use of the type attributes is discouraged and unsupported. Existing shortcodes will get mapped to a similar icon.
  • color – Any one of: grey, white, blue, yellow, green, red, black, purple. Use of the color attributes is discouraged and unsupported. Existing shortcodes will get mapped to a similar scheme.

Box shortcode: [box][/box]

Available attributes

Examples

Just a box with some content in it.
[box]Just a box with some content in it.[/box]

A red box
[box scheme="red"]A red box[/box]

With a black border and icon
[box scheme="red" border_color="#000000" border_width="thick" icon="fa-download"]With a black border and icon[/box]

Custom foreground color
[box scheme="green" fg_color="rgb(255, 255, 255)" icon="fa-refresh" spin]Custom foreground color[/box]

Rounded corners on a spinning icon.
[box icon="fa-spinner" corners="20px" spin]Rounded corners on a spinning icon.[/box]

Compatibility with pre-v2.0 versions

The box shortcode used to accept a type attribute that is now deprecated. Valid values for this attribute were:

  • type – Any one of: normal, info, warning, download, error, success. Use of the type attribute is discouraged and unsupported. Existing shortcodes will get mapped to a similar icon.

Grid shortcodes: [row][/row], [column][/column], [col][/col]

You can divide you content in columns by using the row, column and col shortcodes. col is just an alias of the column shortcode, so you can use whichever feels right to you. You need to wrap a set of columns in a row. Each row takes up the full width of the content area and is divided in 12 columns. For each column you define, you need to specify how many columns it will span so they all add up to 12. For example, you can have one column spanning 12 columns, or two columns spanning 6 each, or two columns spanning 4 and 8, or 12 columns spanning 1.

row – Available attributes

  • none

column, col – Available attributes

  • desktop – Number of columns for the medium breakpoint ‘md‘.
  • tablet – Number of columns for the small breakpoint ‘sm‘.
  • mobile – Number of columns for the extra small breakpoint ‘xs‘. Default ‘12
  • class – Additional classes for the generated wrapper. Useful for applying styles and/or targeting in custom styles.
  • id – An optional HTML id value for the generated wrapper. Useful for targeting in custom styles.

Examples

Two equal rows

Col #1 Content
Col #2 Content

[row][col desktop="6" tablet="6"]Col #1 Content[/col][col desktop="6" tablet="6"]Col #2 Content[/col][/row]

Three equal rows

Col #1 Content
Col #2 Content
Col #3 Content

[row][col desktop="4"]Col #1 Content[/col][col desktop="4"]Col #2 Content[/col][col desktop="4"]Col #3 Content[/col][/row]

Two unequal rows on deskop, equal on tablets.

Col #1 Content
Col #2 Content

[row][column desktop="4"]Col #1 Content[/column][column desktop="8"]Col #2 Content[/column][/row]

Nested columns

WordPress can’t handle nested shortcodes of the same name. So, you can’t really do:

[row][column] Blah blah [row][column] Blah [/column][column] Blah [/column][/row][/column][column] Blah [/column][/row]

We have made available, however, the same row and column shortcodes prefixed with one and two undescores, so for each nesting level (up to two) you just ads an underscore. E.g.:

[row][column] Blah blah [_row][_column] Blah [/_column][_column] Blah [/_column][/_row][/column][column] Blah [/column][/row]

The additionally available shortcodes are: _row, __row, _column, __column, _col, __col

Compatibility with pre-v2.0 versions

The older shortcodes one_half, one_half_last, one_third, one_third_last, two_thirds, two_thirds_last are now deprecated. Although they are mapped to the new column shortcode for compatibility, it’s not possible to automatically wrap them in a row. So, results will vary from installation to installation, and even from post to post. If you are having troubles with the layout of these old shortcodes, try wrapping them in a [row][/row] shortcode.


Headings shortcodes: [h][/h], [h1][/h1], [h2][/h2], [h3][/h3], [h4][/h4], [h5][/h5], [h6][/h6]

With the h shortcode, you can create styled headings for you content. The shortcodes h1-h6 are just shorthand aliases to h with the level attribute already set.

Available attributes

Examples

This is set from the options to be H2

[h scheme="green"]This is set from the options to be H2[/h]

A maroon H3 with globe

[h level="3" icon="fa-globe" fg_color="maroon" spin]A maroon H3 with globe[/h]

An H4 with a lemon

[h4 icon="fa-lemon-o" scheme="yellow"]An H4 with a lemon[/h4]

With a bottom border

[h3 icon="fa-globe" border_width="0 0 4px 0" border_color="#444444"]With a bottom border[/h3]



List shortcode: [list][/list]

You can replace those boring default HTML bullets by any icon you like. Just create a normal unordered (ul) list from within the WordPress editor, and wrap it in a [list][/list] shortcode.

Available attributes

Examples

  • Item 1
  • Item 2
    • Item 2-1
  • Item 3

  • Item 1
  • Item 2
    • Item 2-1
  • Item 3

  • Item 1
  • Item 2
    • Item 2-1
  • Item 3

[list color="red" icon="fa-close"]

  • Item 1
  • Item 2
    • Item 2-1
  • Item 3

[/list]


Compatibility with pre-v2.0 versions

The list shortcode used to accept a type attribute that is now deprecated. Valid values for this attribute were:

  • type – Any one of: check, cross. Use of the type attribute is discouraged and unsupported. Existing shortcodes will get mapped to a similar icon.

Blockquote shortcode: [quote][/quote]

Available attributes

Examples

Try not to become a man of success, but rather try to become a man of value.

Albert Einstein

[quote title="Albert Einstein"]Try not to become a man of success, but rather try to become a man of value.[/quote]

Try not to become a man of success, but rather try to become a man of value.

Albert Einstein

[quote title="Albert Einstein" scheme="green" fg_color="#ffffff"]Try not to become a man of success, but rather try to become a man of value.[/quote]

Compatibility with pre-v2.0 versions

The quote shortcode used to accept a float attribute that is now removed. Valid values for this attribute were:

  • float – Any one of: left, righ. Use of the float attribute is not supported. Existing shortcodes will behave as if the attribute was omitted.

Separator shortcodes: separator , hr

Both shortcodes separator and hr, are just aliases of each other and behave exactly the same.

Available attributes

  • type – The type / styling of the separator. Any one value of: solid, dotted, dashed, double, groove, ridge, inset, outset. Default ‘solid‘.
  • scheme – Color scheme. Any predefined color scheme name.
  • color – The color of the separator. Any valid CSS color.
  • height – The height of the separator (bottom border). Any valid CSS border-width: value.
  • width – The width of the separator. Any valid CSS unit of length.
  • center – Centered separator. Any one value of: true, on. Furthermore, a ‘center‘ value can be placed by itself as a shorthand, without the need for the attribute name.

Examples


[separator /]


[hr type="dotted" scheme="red" width="50%" center /]


[hr type="dashed" scheme="green" height="10px" /]


[hr type="groove" scheme="blue" height="thick" width="80%" /]


[hr type="ridge" /]

Compatibility with pre-v2.0 versions

The separator shortcode used to accept a type attribute that is now removed. Valid values for this attribute were:

  • type – Any one of: normal, lightning. Use of the type attribute is not supported. Existing shortcodes will behave as if the attribute was omitted.

Tooltip shortcode: [tooltip][/tooltip]

Available attributes

  • tip – The content that appears as the tootip. Required.
  • position – The position of the tooltip relative to the hover-able text. Any one value of: top, bottom, left, right. If empty, the tooltip appears over the hover-able text.
  • always – Always show the tooltip. Any one value of: on. Furthermore, a ‘alwayson‘ value can be placed by itself as a shorthand, without the need for the attribute name.
  • color – The color scheme of the tooltip. Any one value of: dark, light. Default ‘dark‘. Furthermore, a ‘light‘ value can be placed by itself as a shorthand, without the need for the attribute name.

Examples

Do you know what a CPU is?

[tooltip tip="Central Processing Unit"]CPU[/tooltip]

Just a tooltip on the top.

[tooltip tip="I'm on top!" position="top"]on the top.[/tooltip]

How about an always on, right, tooltip?

[tooltip tip="Cool!" position="right" light alwayson]always on, right, tooltip?[/tooltip]

Compatibility with pre-v2.0 versions

The tooltip shortcode used to accept a contents and color attributes that are now deprecated. Valid values for these attributes were:

  • contents – The content that appears as the tooltip. Use of the contents attribute is not supported. Existing shortcodes will map this attribute to the tip attribute.
  • color – The color attribute is still in use, however the older ‘grey‘ value is no longer support. Existing shortcodes using ‘grey‘ will get mapped to ‘light‘ instead.

Map shortcodes: [map][/map] , [googlemap][/googlemap]

Available attributes

  • lat – The latitude of a place in the map. Any decimal value between -90 to 90. Required.
  • lon – The longitude of a place in the map. Any decimal value between -180 to 180. Required.
  • zoom – Zoom level of the map. Any integer value between 0-21. Default ‘8‘.
  • title – The text appearing when hovering over the map marker.
  • text – The text appearing when the map marker gets clicked.

Examples

[map lat="40.7828649" lon="-73.9653549" zoom="16" /]

[map lat="40.7828649" lon="-73.9653549" title="New York" text="Central Park" /]

Compatibility with pre-v2.0 versions

The googlemap shortcode used to accept a src attribute that is now deprecated. Valid values for this attribute were:

  • src – A google maps URL. Use of the src attribute is no longer supported. Existing shortcodes will extract and map this attribute to the appropriate lat, lon and zoom attributes.

Tabs shortcodes: [tabs][/tabs] , [tab][/tab]

In order to create a set of tabs, you need to wrap one or more [tab][/tab] shortcodes into a [tabs][/tabs] shortcode.

tabs – Available attributes

tab – Available attributes

  • title – The text that appears on the tab. Required.

Examples

Content 1
Content 2
[tabs][tab title="Tab 1"]Content 1[/tab][tab title="Tab 2"]Content 2[/tab][/tabs]



Accordions shortcodes: [accordion][/accordion], [accordion_tab][/accordion_tab]

Accordions’ syntax and attributes are exactly the same like the tabs shortcode. Only the actual names of the shortcode change. That way, you can easily swap from tabs to accordions and back, without touching any of the attributes.

accordion – Available attributes

  • scheme – Color scheme. Any predefined color scheme name.
  • bg_color – The background color of the accordion tabs’ content. Any valid CSS color.
  • fg_color – The foreground (text) color of the accordion tabs’ content. Any valid CSS color.
  • tab_bg_color – The background color of the inactive accordion tabs. Any valid CSS color.
  • tab_fg_color – The foreground (text) color of the inactive accordion tabs. Any valid CSS color.
  • active_bg_color – The background color of the active accordion tab. Any valid CSS color.
  • active_fg_color – The foreground (text) color of the accordion active tab. Any valid CSS color.
  • border_color – The border color of the accordion. Any valid CSS color.
  • border_width – The width of the accordion’s border. Any valid CSS border-width: value.
  • corners – The radius of the accordion tabs’ border corners. Any valid CSS border-radius: value. Note: If you provide a single CSS unit value, it will only be applied to the to top-left and top-right corners of each accordion tab. This is on purpose, to get the best result with minimal typing. If you need to affect all corners of the accordion tabs, you’ll need to provide four values, e.g. corners=”10px 10px 10px 10px”

accordion_tab – Available attributes

  • title – The text that appears on the accordion tab. Required.

Examples

Content 1
Content 2
[accordion][accordion_tab title="Tab 1"]Content 1[/accordion_tab][accordion_tab title="Tab 2"]Content 2[/accordion_tab][/accordion]



Common attributes.

Predefined color schemes.

Any shortcode that accepts an attribute named ‘scheme‘ can accept any one of the following values: blue, red, yellow, orange, purple, pink, brown, green, grey, white, black.

color

All attributes in every shortcode that accept a CSS color value, usually named ‘something_color’ can accept any of these color formats:

  • Hexadecimal: #000000 to #ffffff upper-case or lower-case. Shorthand notation is not allowed, i.e. #000 to #fff
  • rgb(): rgb($r, $g, $b) – Where $r $g and $b is a number 0-255 or a percentage 0%-100%
  • rgba(): rgba($r, $g, $b, $a) – As above, and $a between 0-1.
  • hsl(): hsl($h, $s, $l) – Where $h 0-360, $s and $l 0%-100%.
  • hsla(): hsla($h, $s, $l, $a) – As above, and $a between 0-1 (decimal values allowed).
  • Any one of the following keywords: transparent, initial, inherit, black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua

Please note that common names between the predefined colors above and the color schemes, doesn’t necessarily translate to the same color values.

spin_icon

Where a spin_icon attribute is available, valid values are: ‘true‘, ‘spin‘.
Furthermore, a ‘spin‘ value can be placed by itself as a shorthand, without the need for the attribute name.

Examples

The following shortcodes are all identical:

[button icon="fa-download" spin_icon="spin"]Some text[/button]

[button icon="fa-download" spin_icon="true"]Some text[/button]

[button icon="fa-download" spin]Some text[/button]

They all produce:

Some text

border_width

Shortcodes that have a border_width property, can accept any valid CSS shorthand border-width value:

  • One to four CSS units of length.
  • Any one of the following keywords: thin, medium, thick, initial, inherit

Examples

Just box.
[box border_width="2px"]Just box.[/box]

Just a weird box.
[box border_width="1px 2em 8px 4rem"]Just weird box.[/box]

corners

Shortcodes that have a corners property, can accept any valid CSS shorthand border-radius value:

  • One to four CSS units of length, optionally followed by a forward slash ‘/‘ and one to four CSS units of length.
  • Any one of the following keywords: initial, inherit

Examples

A box with rounded corners.
[box corners="10px"]A box with rounded corners.[/box]

A box with strange rounded corners.
[box corners="20px 2em / 10px"]A box with strange rounded corners.[/box]

Length Units

Any property that requires a CSS unit of length accepts a number immediately followed by one of the following units: px, %, em, rem, ex, ch, vh, vw, vmin, vmax, mm, cm, in, pt, pc

Decimal numbers expressed in pixels (px) may or may not work depending on each browser’s handling, they are however accepted by the plugin.

Examples

  • 1px
  • 0.5em
  • 1.2rem

Compatibility Mode

It’s quite common for users to have installed more than one shortcodes plugins, or for themes to provide their own shortcodes. When this happens, chances are that some shortcodes overlap, and more often than not, you end up having shortcodes that you can’t be sure where are they getting their styles and markup from.

Just go into the plugin’s settings panel, check the Compatibility Mode checkbox and Save Changes. You’ve just future-proofed your posts! All shortcodes now require a prefix of ‘ci-‘ minimizing the risk of collision with other shortcode providers. For example, instead of [button]Hello[/button] you should now write [[ci-button]Hello[/button]]