Shortcodes

Shortcodes are small text macros or shortcuts to producing complex elements in page content. They can be used for a wide variety of purposes depending on your theme. Some examples of uses for shortcodes include:

  • Nice looking buttons
  • Rows and columns
  • Forms
  • Photo galleries
  • Pricing tables
  • Tab elements

goget

On goget.com.au, content editors can simply add the shortcode [find-cars] on any page to insert the find cars map element.

Shortcodes are always surrounded by square brackets and can have optional interior content.

Shortcode with no attributes or content

[find-cars]

Shortcode with attributes

[button colour="blue" link="http://www.example.com" text="Click me"]

Shortcode with attributes and interior content

[button colour="blue" link="http://www.example.com"]
  Click me
[/button]

Note that when a shortcode has interior content, it must use a closing tag.

Shortcodes available will vary from site to site, so please check your theme documentation for more details on shortcodes. If your theme uses Visual Composer, all shortcodes can usually be added and configured like any other Visual Composer widget.

 

WordPress Custom Post Types - NextNextPrev - WordPress Post TagsPrev