Documentation:UBC Content Management System/What is a shortcode

From UBC Wiki
UBC CMS
Codex
Welcome to the support documentation for the
UBC CMS Service.
Contents

UBC Content Management System

UBC Collab Theme

UBC Collab Theme Overview
Theme Options Index
CLF Options
Layout Options
Frontpage
Navigation
Display Options
SEO
Export
Import
Global Theme Options

Dashboard Overview
Pages and Posts
Adding Users

Menus
Widgets
Plugins
Forms
Shortcodes
RSS Feeds
Going Live

Complete Topic Index
PDF Wiki Book Version

A Shortcode is a WordPress-specific code that is used in post/page content or the section widget to execute a piece of dynamic code.

For example, assume the shortcode [year] will display the current year. How can this be useful? Well, if you ever write, "In 2010 things will be different" and want 2010 to automatically correspond to the current year, you can just write "In [year] things will be differrent" and the year will automatically correspond to the current year.

In other words, a shortcode is a WordPress-specific code that lets you do nifty things with very little effort.

PLEASE NOTE: Shortcode attributes, for example, an attribute would be the title in the accrodion shortcode [accordion title="Accordion Title"], should not contain any html tags, for example: strong tags, header tags, page breaks. The effect could cause issues with the websites layout or functionality.

Popular Shortcodes

See Also