A Simple Free Plugin That Makes WordPress Easier To Use And Saves You A Lot Of Time


Shortcoder, A Macro Of A Difference

Once discovered this is one WordPress plugin you won’t want to be without.

WordPress has shortcodes built in, shortcode extension plugins and for this post, plugins that let you create your own shortcodes. There are a number of plugins that do this but the one I am using and the one I am going to talk about is this one “Shortcoder“.

What Is A Shortcode?

A shortcode is a “Macro” so I guess the question really is, what is a macro?

A shortcode or macro is a place holder that can be replaced by something else such as a sentence, a block of code or some paragraphs. Not only can you substitute them but you can send parameters or if you like values from the macro to that which substitutes it.

An example is needed here I think! Let’s look at an existing shortcode from the WordPress list of shortcodes*, let’s use the Video shortcode:

[video src="http://workwithstuartchalmers.com/wp/wp-content/uploads/http://workwithstuartchalmers.com/Misc/What_if_money_was_no_object_Alan_Watts.mp4" height="225" width="300"]

And here’s how that looks:

Now let’s break it down

Note that I can’t put in the actual square bracket here in this bullet list because I’m using WordPress and it tries to evaluate a shortcode. Odd really because I could show the square bracket earlier and further down by typing it twice but that’s a foible of WordPress I guess.

  • ­­{square bracket}video
    • This is the start of the video shortcode saying which shortcode it is.
  • src=”http://workwithstuartchalmers.com/wp/wp-content/uploads/http://workwithstuartchalmers.com/Misc/What_if_money_was_no_object_Alan_Watts.mp4″ 
    • This is a parameter or value that gives the URL of where the video is!
  • height=”225″ width=”300″
    • And these two parameters or values give the height and width of the video display area.
  • ]
    • This ends the shortcode.

What was great about that was that you didn’t have to put any code in there and if the player that WordPress uses improves or changes then it won’t matter because the macro is substituted only when the page is displayed.

To Shortcoder

This is the signature section I have at the bottom of each post:

Signature section

But what if I change it? The trouble is I might already have used it in 100 posts so if I change it I may have to go back and change 100 posts which will take ages … Erk! Not only that, every time I create a new post I have to copy it forward which doesn’t take long but it all adds up.

Not a problem because with the use of shortcoder I just put this in my post editor “[sc name=MySig]” and the centrally stored signature section will be substituted only when each page is displayed.


You can use parameters with Shortcoder like this …

Here’s the shortcode:

[sc name=Sentence1 param1="Stuart"]

Here’s the sentence that will be substituted:

My name is %%param1%% and I wrote this sentence.

And here’s the result:

My name is Stuart and I wrote this sentence.

This is how it looks in the Shortcoder editor:

Shortcoder editor

Simple but effective!

By the way, the “Mysig” shortcode is the signature section below and the “Sub1AWeek” shortcode is the subscribe form just below which in reality is 99 lines of horribly messy HTML code but with a shortcode we don’t have to worry about it in our posts.

Shortcoder also places an icon in the post/page editor so you can easily pick the shortcode you want to use:

Shortcoder editor icon

If you want to delete a short code from the shortcode editor you just drag it to the bin icon on the right near the bottom of the screen but be careful that your not using it before you do this.

Shortcoder delete

A frustrating thing that WordPress does is the post/page editor will sometimes strip out bits of HTML or Java script that you want to use. Make that HTML or Java script a short code and it doesn’t get stripped out.

And finally whilst this is a free plugin you can donate something from the plugin page or by clicking a link at the bottom of the shortcoder editor.

*Note that there are two versions of WordPress, WordPress.com and WordPress.org and they use different built in shortcodes.

I hope that’s useful to you and if you would like to know about my future posts you can sign up to my once a week list below if you want, if you are on this list you won’t get promotional emails unless I am personally recommending something and even then it will be a gentle promotion. You will get notified of my blog posts in my newsletter type broadcasts which I normally email out once or twice a week.

Sign up to my "1 A Week" list
for techy tips, resources,
freebies and other useful stuff.


Thanks for reading this far.

Please like my Facebook Fan Page www.facebook.com/StuartChalmersNormalGuy
Facebook Stuart Chalmers Friend me on Facebook or just check me out
Twitter Stuart Chalmers Follow me on Twitter
Google+ Stuart Chalmers Add me to a Google+ circle or just check me out
Skype Stuart Chalmers Skype me at stuart.chalmers

A Simple Free Plugin That Makes WordPress Easier To Use And Saves You A Lot Of Time – Shortcoder


Leave a Reply

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