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.