What are Shortcodes?
Shortcodes are Wordpress-specific codes that generate specific functions within your post or page.
For example, you can use shortcodes to create different post or page layouts, such as columns, tabs and content toggle (e.g., open and close content). Additionally, shortcodes can be used to generate buttons, format text or pull in a list of related articles.
The Mirror theme is the only current theme for U.OSU that uses these shortcodes.
How do I use them?
You can add shortcodes to pages or posts within the Mirror theme. Once a shortcode is added to the page or post, it appears within brackets on the Edit page.
In some cases, the shortcode may be minimal, such as the horizontal divide which displays a horizontal line on the published post or page:
When the shortcode includes one pair of brackets, add the shortcode where needed on the page. There are no additional steps required. When saved, it will display where added on the page.
However, some of the shortcodes are a bit more involved. When a pair, or multiple pairs, of brackets are visible on the page, they are usually separated by text. The text that separates the bracket pair is a placeholder for your text information.
For example, a two column shortcode would appear on the Edit page as:
[twocol_one]Column 1/2[/twocol_one] [twocol_one_last]Column 1/2[/twocol_one_last]
"Column 1/2" refers to the width of the column (50%) and is the placeholder text. Replace all placeholder text with your own information. Once you click save or publish, your information will display in a column format on the published page, as shown below.