WordPress Tips & Tricks: How-to Implement Shortcodes
Today's Editor's Picks
WordPress has many different plugins to extend its base features and flexibility. One of the coolest types of WP plugins is those that allow you to use shortcodes.
This is what WordPress.com has to say about shortcodes:
A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut.
There are many different types of shortcodes, too, all you need to do is add [ and ] around the keyword of the site:
- For embedding video such as vimeo for Vimeo videos
- For embedding audio such as soundcloud for Soundcloud files
- For embedding images such as slideshare for Slideshare presentations
- Others like polldaddy for embedding Polldaddy polls
Let’s say you want to include a video file from Flickr.
1. Browse and find the file you wish to embed
2. Insert the Flickr URL inside the flickr shortcode such as flickr http://example.com
You can also set parameters for the shortcode such as adding w=n & h=n as the width and height like so:
flickr http://example.com w=300 h=200
Just to remember to add the [ and ] brackets before and after the insertion.
Many of these shortcodes are built-in to the base installation of recent versions of WordPress!
However, if you’re operating on an older installation or feel that these may be out of your league in terms of programming than you can use a variety of WordPress plugins to handle these additions.
One of the most popular WP Plugins for adding shortcodes is: WordPress Shortcodes.
Yes, it’s not all that much of a clever name but it certainly gets the job done!
The plugin allows you to make all kinds of tweaks to your WordPress blog, including:
- Tabs (horizontal and vertical)
- Author cards
- And more
Have a look at the following screenshot to see how it works behind the scenes:
If this plugin doesn’t do the trick than you could set a budget and purchase one of the highly rated WP shortcode plugins on CodeCanyon such as Vision – WordPress Shortcodes Plugin or Styles with Shortcodes for WordPress.
Both of these are similar in many ways and will only set you back between $20 – $25.
These plugins go well beyond the free plugin from the directory and allows such shortcodes as:
- Colored boxes
- Social buttons
- And more
Basically, you can take one of these plugins and begin creating an array of graphical tweaks to your website to make it stand out from its base installation. The shortcodes allow you to implement just about anything on your mind without needing a great deal of technical knowledge.
Using Shortcodes in Business
“But, what do I actually use them for?”
Shortcodes don’t just add a cool visual style to your website – they can be effective in business, too!
- Buttons – A simple link pointing to an affiliate offer may get the job done but they can be easily lost within the body of your content. A button, on the other hand, is easy to spot and almost begs users to click because it’s within our nature to be curious to see how it reacts.
- Call-outs – Need to display a very important piece of information but don’t want to use a blockquote, italics, or bold? Consider using a colored call-out which will make the information pop off the page so readers can’t help but take a look.
- Tables – Tables are great for comparing information (which is why you see them used in businesses that offer tiered versions of their products, like web hosting). You could use shortcodes to create pricing tables to show off the different levels of product to visitors so they don’t feel pushed into something they don’t need.
The limits are endless with shortcodes; it all depends on your creativity and goals.
Consider giving shortcodes a go. You may be pleasantly surprised as the amount of flexibility and professionalism you can bring to your WordPress installation (without the trouble of learning to code).