How WordPress Shortcodes Can Save You Hours of Rework

Unless you are a techie, you may not have heard of WordPress shortcodes. Prepare to have your mind blown.

As bloggers and online business owners, most of us have some text, images, or code that we reference often in blog posts. For me, this is my affiliate disclosure. While it’s easy enough to pull from my Trello board, I recently ran into a problem that forced me to revisit how I look at this.

Over on my other site, I needed to update something within the affiliate disclosure. I thought it would be a good task to do while watching some TV, but when then I realized the amount; I had over 100 blog posts that I would have to edit to make this change. 

I knew I had to find a better way.

Time Management for Bloggers -- Use WordPress Shortcodes to write it once and use it over and over again. HUGE time saver.

After a fair amount of time digging around online, I discovered WordPress shortcodes. A short code is one word in brackets that ‘calls’ for something else in it’s place.

I knew if I could figure out how to do it, then I just need to remember to put the word DISCLOSURE in [ ] at the beginning of my post, and I never need to worry about it again. AND if I decide to make an update to my affiliate disclosure the next time the FTC makes a change, I don’t need to update ALL of my posts. Just one snippet of code. ūüôā

You aren’t just limited to using WordPress shortcodes¬†for an affiliate disclosure either. I decided (also on my other blog) that I wanted to share a few of my current favorite products from amazon at he bottom of my posts. Again – I wanted something that I could update without having to go back and update all of my old posts. Now one insert of [psupplies] and my current favorites are displayed at he bottom of my posts.

HOURS saved. MONEY saved. PATIENCE saved.

Ways to use WordPress Shortcodes

You can use WordPress shortcodes for anything, but here are a few things you may be doing that could be replaced by a shortcode.

  • Affiliate disclosure
  • Signature (image or written sign off)
  • Favorite products/tools spotlight
  • Email opt-in (if your provider doesn’t provide a plugin that does it)
  • Link to a post/page you reference frequently
  • Author Bio
  • Other posts you may love (by category)

Free WordPress Shortcode download

I know how busy you are, and I want to help. Enter your email address and confirm your subscription to start an automatic download of a txt file containing the WordPress shortcode template code and a completed WordPress shortcode for your affiliate disclosure.

How to use Wordpress Shortcodes

I’m providing both written directions and a video overview for this tutorial.

In your WordPress menu, select¬†‘Appearance’ and then ‘Editor’. From there, click on your ‘Functions.php file’, which is usually¬†named ‘Theme Functions’.

IMPORTANT!– An error in your functions.php file can take your site down. Be sure to copy and paste the current functions.php into a text file (like notepad) and save it as functions.php so you can quickly upload using your hosts file manager in the event that something gets messed up.

Scroll the the very bottom of the file and add a few lines of space using the ‘enter’ or ‘return’ button on your keyboard. Paste¬†the code I’ve provided or create your own, and hit save.

Now, in your blog posts you can call to this piece of code by using the brackets around the name of the code. So for example, [TESTING].

Seriously, thats it.

Scared of touching code? Search for shortcode WordPress plugins! There are tons out there, I just personally found this DIY method quick and easy.

Good luck and I can’t wait to hear how much time you’ll save!

Additional resource: WordPress Shortcode API overview

Get Instant Access to our FREE Resource Library

Sign up to receive our newsletter and you'll get free printables and exclusive content through our members-only resource library!

Powered by ConvertKit

Written By
More from Jennifer

Free Script Fonts (Part 2)

I’ve shared some of my favorite script fonts in the past, but...
Read More

1 Comment

Leave a Reply

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