If you’ve noticed, one of WordPress’ rules of thumb is to always, always make things a little easier for everyone– newbies and experienced developers alike. One of the ways they get to achieve this goal is through the use of shortcodes.
The WordPress.com Support Page defines them as such:
Sounds pretty simple. Now, If you haven’t heard of shortcodes before this article, and you don’t know what they look like, they’re those archaic code-like text wrapped in square brackets.
Compared to normal code, which typically looks like this:
Shortcodes in general look a little something like this:
…and if you’re a developer (or heck, even someone who’s been around a computer at least twice), you’ll probably agree that mere the act of typing and clicking to get one measly task done can eat up lot of your time. For the same reason we have keyboard shortcuts, shortcodes exist to make things easier for all of us, so we save up time in order to do and create better things; they’re very much like shortcut keys in that they have that very same purpose.
Now let’s go back to this specific piece of shortcode, the same as above:
This specific one is called the embed shortcode and is built-in by default in WordPress. It embeds the video from the URL into your content. If you’re on WordPress right now, you can copy and paste the above shortcode in your site if you want to give it a spin.
Shortcodes aren’t the perfect solution to time-saving, though. In our previous article, we delve in deeper into why shortcodes have its own share of cons, and what the Sandwich Team’s brewing up in order to fix them.
For now though, feel free to tinker with shortcodes and see just what they can do for you.