How to Create a WordPress [Shortcode]

Posted on March 18, 2014

How to Create a WordPress ShortcodeWhen building or modifying a WordPress theme, it can be time consuming to have to retype the same bit of code over and over again as you move from page to page.  On the flipside, once you hand off the project to the client, trying to explain how to insert a <span> tag with a class attribute is like trying to explain to a three year old how to work the DirecTV remote (for what it’s worth, I think this would actually be easier).  Enter [shortcodes].

Shortcodes have been a part of the WordPress core since the release of 2.5 and they can be a real time saver.  For instance, let’s say that you want to include a call to action button at the bottom of all of your posts about WordPress but only WordPress and not every article you ever post.  This would be time consuming for you and impossible for a client.  Instead, why not just create a shortcode that can be used by the client whenever they want to drop in the button.  You can even style the button for them and what’s best…it’s actually pretty easy to achieve.  Check out the video below to see just how quickly you can create your very own WordPress [shortcode].


Leave a Reply

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


Ready to Get Started? Call 203.516.0359