A Shortcode is a WordPress-specific code that is used in post/page content or the section widget to execute a piece of dynamic code.
For example, assume the shortcode [year] will display the current year. How can this be useful? Well, if you ever write, “In 2010 things will be different” and want 2010 to automatically correspond to the current year, you can just write “In [year] things will be different” and the year will automatically correspond to the current year.
In other words, a shortcode is a WordPress-specific code that lets you do nifty things with very little effort.
PLEASE NOTE: Shortcode attributes, for example, an attribute would be the title in the accordion shortcode [accordion title="Accordion Title"]
, should not contain any HTML tags, for example, strong tags, header tags, page breaks. The effect could cause issues with the website's layout or functionality.