Shortcodes are formatting actions that are defined within open and closing square brackets. You will find some of the advanced editing features such as adding an image or a file download link will show up as a shortcode.
A pair of square brackets in your text may be confused with a shortcode, if this happens enter two square brackets instead, you would type [[brackets]] to get [brackets] – but you are unlikely to need to do this normally. |
You will see shortcodes inserted by some of the editing actions, most notably when you insert a PDF file into a page you will see en entry start with [[ pdf-embedder url= /]]
In general you will not need to use shortcodes yourself as these are created by the editor when adding files or other items. You can edit a shortcode if you are careful (see later) to change its behaviour.
The EWPH site makes use of several shortcodes that have been written specifically to support requirements not found in standard plugins. The ewph-codes plugin is installed just like other Plugins and the shortcodes are described on the EWPH Shortcodes page.
Using Shortcodes
Simple short codes are a name in square brackets [clear] but preferably with a forward slash after the word [clear/].
Shortcodes may have addition attributes listed after the shortcode name which also have names and are followed by an equals sign and a value [pdf-embedder title=Demonstration/] but ideally the value will be enclosed in apostrophes or speech marks [pdf-embedder title="Demonstration"/]. Shortcode and attribute names cannot contain spaces and attribute values must be put inside apostrophes or speech marks if they do contain spaces.