Shortcodes are a pretty simple concept by definition, but we can still distinguish three main types, as follows:
- Single-tag shortcodes: These shortcodes are executed with just a single tag, for example, [my_first_shortcode/].
- Double-tag shortcodes: These shortcodes are executed with opening and closing tags, for example, [my_2nd_shortcode]some text here[/my_2nd_shortcode] (notice that the closing tag has an additional /). As you can see, there's also some content within the tags. This content can be processed by the shortcode function.
- Shortcodes with attributes: These shortcodes can have one or two tags and also a number of attributes we can use to customize the output, for example, [my_3rd_shortcode name="Karol" twitter="carlosinho"]some text here[/my_3rd_shortcode].