Shortcodes

1. Overview

This site implements a large number of shortcodes providing advanced formatting capabilities or allowing you to embed advanced functionality directly within pages. WordPress shortcodes provide us with a mechanism to expand on the formatting capabilities of Markdown in a controlled and well-defined manner.

A WordPress shortcode is enclosed in tags using square brackets, and looks something like:

1
[shortcode-name parameter="value"]
2
shortcode content
3
[/shortcode-name]

All shortcodes provided as part of the CUE theme and Justice plugins have names beginning with gn: to avoid potential conflicts with shortcodes introduced by third-party WordPress plugins.

Shortcode content can take three forms. Most of the time a shortcode provides functionality wrapping over some enclosed blob of content, in which case the text between the opening and closing tags is treated as normal content - Markdown and/or other shortcodes. In select cases such as the gn:include shortcode, no content is required and both the content and closing tag can be omitted.

The third case occurs when a shortcode requires advanced configuration capabilities where ordinary WordPress shortcode parameters are inadequate. Here by convention the content of the shortcode is handled as additional configuration specified as an inident document, which is merged onto any shortcode parameters.

Related Pages

A complete alphabetical listing of the consolidated territorial Acts and associated regulations.
Contact the Department of Justice