Introducing Shortcodes

In WordPress, Shortcodes are used to make specific tasks shorter, easier and to save time by lessening the same task doing again. As the name implies shortcodes are simply tiny codes that actually allow you to do lots of things with a minimal effort.

Shortcodes were launched first in WordPress 2.5 version in order to allow users to execute code inside WordPress posts, pages, and widgets without writing a single code directly. In this case, you just have embed files or create objects that would normally demand a lot of codes in just one single line or half of a line.

For instance, embedding a table through a shortcode would look like this:

[table id=”6534″]

Shortcodes can also come up with attributes. For instance, the shortcodes for a video also can take an src attribute.

There is some built-in shortcode for video, caption, embed, and gallery as well. You can add more by using the plugins. You can use the text of a shortcode in a post simply just using double brackets.

Shortcodes are something additional that leverage the tasks and makes the things very easier. Hopefully, this pro-tip was helpful. Find more Pro-tips here.

Leave a Reply

Your email address will not be published. Required fields are marked *