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 WP-Filebase uses shortcodes to show where a link to a file is inserted into the page. A Parish Hall newsletter inserted as an embedded PDF will look like:
[wpfilebase tag=file id=321 tpl=embed-pdf /]
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. In the embedded PDF example you can choose a different PDF by editing the id number to that of the new file – or just delete the current shortcode and use the WP-Filebase icon to inserted a new file.
You will find the following shortcodes are specific to the EWPH web site and are not available using the editor icon bar: they must be typed in as text:
[clear/] – ensures text starts below any pictures that are left or right aligned
[of-child-table/] – generates a summary table (2 columns) of all child pages (title and the first paragraph) and a more details link
[of-child-summary/] – generates a list summary of all child pages (title and the first paragraph) and a more details link
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 [wpfilebase tag=file id=321/] but ideally the value will be enclosed in apostrophes or speech marks [wpfilebase tag='file' id='321'/]. Shortcode and attribute names cannot contain spaces and attribute values must be put inside apostrophes or speech marks if they do contain spaces.