WordPress Shortcodes

The Correct Use of WordPress Shortcodes

By The WordPress Helpers 2 Comments

WordPress Shortcodes

The day we launched The WordPress Helpers, I mentioned the work of Ren Ventura. Today, Ren is back, and has said something that we wholeheartedly agree with, are guilty of ignoring from time to time, and … will continue to ignore.

And if you think that’s a problem, you’re right. And if you think it’s a BIG problem, well, it’s even bigger than you think.

Ren has published a piece called Stop Using Theme Specific WordPress Shortcodes. And he’s right; WordPress Shortcodes are really useful, kind of evil, and all but impossible to avoid; even Automattic uses and promotes them (in Jetpack, among other places). But if you keep your shortcodes distinct from the other things you cram into WordPress, you can manage them well enough that the “evil” part doesn’t need to matter.

Why is this important? Why is it the kind of crucial thing that drove the launch of The WordPress Helpers? Because as cool as WordPress is, and as thankful as we should all be that it’s open-source and freely available, you can turn your WordPress installation into a morass of code that you’ll have a very hard time changing if you use WordPress Shortcodes the wrong way.

I explained this a bit here. Shortcodes that live in your theme tie you to that theme. For that matter, Shortcodes like the ones in JetPack tie you to Jetpack; the day you want to stop using Jetpack or switch themes, WordPress Shortcodes become WordPress Nightmares. That’s not why you use WordPress.

On the other hand, when you use WordPress Shortcodes the correct way you can guarantee their portability. Shortcodes that live in discrete plug-ins survive theme changes; the plug-in goes with you and the shortcodes keep working.

Ren Ventura is one smart dude. We even think we can forgive him being a Cleveland Cavaliers fan.

Source: EngageWP 
Stop Using Theme-Specific Shortcodes
Free Stuff!
No charge. No SPAM. Unsubscribe any time.

We'll send a weekly email with the latest information, recommendations, quick WordPress tips and more. We're serious about privacy and won't spam you or sell your information.

Or if you prefer, subscribe to our RSS feed. Stay up to date, live!

<center>The WordPress Helpers: Making WordPress Work</center>
Using WordPress Shortcodes The Correct Way
Article Title:
Using WordPress Shortcodes The Correct Way
Other than "not at all", what's the right way to use WordPress Shortcodes? Listen to the wisdom of Ren Ventura; wordpress shortcodes built into themes are a bad idea for everyone but the theme developer


  1. Pingback: The WordPress Helpers WordPress Roundup 6-Feb-2015 - The WordPress Helpers

  2. Pingback: Theme Builders, Page Builders, WordPress Theme Concepts - The WordPress Helpers

Leave a Comment