Table of contents
Shortcode is a specific WordPress code allowing you to create various elements on the site easily. With the help of shortcodes, you can publish videos, photo galleries, forms, etc. on the site using only one line of code. Shortcodes are written in square brackets.
Shortcodes can be used in WordPress editor, in text widgets, in theme files, and other places.
This is how simple shortcode looks like:
[shortcode]
Shortcodes may have settings, for example:
[gallery_shortcode ids="1, 2, 3"]
Shortcode may have closing tag, with the help of which shortcode may contain some text. For example:
[button] Click me [/button]
A shortcode may contain other shortcodes. However, identical shortcodes cannot be nested into each other. Example of nested shortcodes:
[box] Hello, [username] [/box]
WordPress provides a set of standard shortcodes: audio, caption, embed, gallery, video, and playlist. Learn more about shortcodes from WordPress codex.
Shortcodes Ultimate adds 50 new shortcodes which you can use.
Note: shortcodes specified in this article are only examples and will not work on your site.