Remove Orphan Shortcodes

Unused shortcodes are the cobwebbed clutter that can make even the best WordPress site look like a neglected trash heap of a website. You know what I mean, right?

A Fanciful & Overly Detailed Example of Unused Shortcodes

Ever come across a site that looks like this:

Just writing some loverly content, 
and now I want to show you a gallery!

[cool-gallery-bro id="404"]

Oh, weird, there’s no gallery. Just some text inside brackets. This is an unused, or orphan, shortcode. At one time in a bygone era, WordPress transformed this mighty shortcode into a glorious and prosperous gallery. But now it doesn’t. Maybe the plugin broke. Maybe it got deactivated, or deleted.

The point is, now WordPress doesn’t know what to do with it, so instead of a brilliantly majestic gallery, sure to make your enemies gnash their teeth in envy at its glory, you’re left with this derpy bit of text. Your enemies are laughing at your misfortune!

Best thing to do here depends on whether this happened on accident, or whether it’s intentional. If it’s accidental, try to find the plugin that can bring your gallery back, thus bringing peace and order to the galaxy once more.

If, however, this gallery was a backstabbing miscreant, a miserable fink who only brought you ill tidings and woe, then you’re better off without his insufferable ass. You were right to jettison that plugin like the deadweight it was! The only problem is the jackass left his shortcodes behind, expecting you to clean up after him. Outrage!

Fortunately, you don’t have to remove them all by hand. You can use Better Search Replace to banish all of them for all time. I would do this first, though: install Remove Orphan Shortcodes.

How Remove Orphan Shortcodes Works

Remove Orphan Shortcodes is a novel plugin: it doesn’t delete the wasted shortcodes, it prevents the shortcodes from appearing on the front-end of your site.

That way, your site doesn’t look dopey, and you can bring back the plugin if you decide to later.

I would recommend this plugin to anyone who:

  • Has a lot of content and plugins on their site
  • If the content is more than a year old
  • If there are large chunks of content that you didn’t create