WordPress shortcodes are great in the moment. But if you ever do something to deactivate those shortcodes (like change themes or disable a plugin), they can totally ruin your site’s content.
See, when you deactivate a shortcode, it doesn’t just disappear. Instead, you get left with a nasty mess of [naked_shortcodes] polluting your content. In fact, this very phenomenon is one of the biggest criticisms of the massively popular Divi theme.
In this post, I’m reviewing Shortcode Cleaner, a plugin that aims to fix all that. It lets you automatically hide all the broken shortcodes on your website without lifting a finger.
While there are other plugins that let you hide shortcodes from the frontend of your site, Shortcode Cleaner also lets you completely hide those shortcodes from the backend if desired, which isn’t a feature that’s available in any of those plugins, as far as I know.
And in a recent update, Shortcode Cleaner also added the option to completely remove shortcodes from the database.
If that intrigues you, give my Shortcode Cleaner review a read. In addition to telling you more about how the plugin works, I’ll also give it a live test and try to hide the leftover shortcodes from a Divi theme website, which should be something of interest to a lot of readers!
Shortcode Cleaner Review: What The Plugin Does
If you’ve ever used the Broken Link Checker plugin, I think you’ll see a lot of similarities in how Shortcode Cleaner works…with the one obvious difference being that Shortcode Cleaner looks for broken shortcodes rather than broken links.
Shortcode Cleaner sets you up with a dashboard that gives you a report of every single broken shortcode on your site, along with how many instances there are of each specific shortcode.
It will even tell you exactly where that broken shortcode is located, with direct links to manually edit each instance.
Article continues after this block
You can use this bird’s eye view to manually remove individual broken shortcodes. Or, you can always let the plugin automatically do the work for you.
And, like I alluded to in the intro, Shortcode Cleaner actually gives you two different ways to “clean” your shortcodes. You can:
- Hide them on the frontend but leave them visible in your backend content
- Completely hide them from both the backend and frontend
Finally, there are some other helpful advanced features like:
- Option to exclude certain shortcodes from being cleaned
- Ability to leave/remove the actual content in between the shortcode
- Option to only run check on certain filters, or add your own custom content filters.
So…the feature list is obviously hitting on a real pain point. But does it work as promised? Let’s give it a test!
Hands-on With Shortcode Cleaner: How To Hide Broken Divi Shortcodes
For the hands-on section of this review, I’m going to focus specifically on how to hide broken Divi shortcodes after you deactivate the theme/plugin. But remember, Shortcode Cleaner handles any type of broken shortcodes – it’s not just limited to Divi.
I’ve set my test site up with a Divi library template for its homepage and then promptly switched back to the Twenty Seventeen theme.
Here’s what my homepage looks like after doing that:
Yeesh…let’s see if Shortcode Cleaner can save the day.
Here’s What The Shortcode Cleaner Dashboard Looks Like
After installing and activating the Shortcode Cleaner plugin, you can access the dashboard by clicking on the new Cleaner option in your WordPress dashboard sidebar.
Here’s what the dashboard on my test site looks like without any action on my part:
You can see that Shortcode Cleaner was able to pick up on all the broken Divi shortcodes, as well as a separate broken shortcode for the disabled Modula gallery plugin (I test a lot of plugins on this site!).
If you click on any of the broken shortcodes, it will open up a popup that lists every instance of that shortcode:
And you can also view all this information in your admin toolbar, if desired:
Here’s What The Content Looks Like
As soon as you activate Shortcode Cleaner, it automatically starts hiding shortcodes on the frontend, but leaves the shortcodes in your backend content.
So at this point, my frontend content already looks completely clean:
But all the Divi shortcodes are still present on the backend for now, which you can see in the WordPress editor:
As I said, there are other plugins that do this part, so we aren’t necessarily breaking new ground yet. Let’s kick things up a notch….
How To Remove Shortcodes From The Backend
To clean shortcodes from the backend, you need to go to the plugin’s General settings tab and turn on the Enable Cleaner on the Backend option:
And once that’s done…voila!
No more Divi shortcodes, even on the backend!
By default, the plugin just hides the shortcodes and leaves them in the database. But in a recent update, the developer added the option to completely remove shortcodes from the database. You can see a screenshot of the new feature, as well as my original review, below:
*Note – I was curious whether the plugin actually removes shortcodes from the database with this option or just hides them, so I actually dug into the database. Doing this, I was able to confirm that Shortcode Cleaner is just hiding the shortcodes on the backend – they still exist in the database. But! If you do want to remove the shortcodes from the actual database, there is still a solution/workaround. If you click Update to save the version of the post with the shortcodes hidden, that will actually save a clean version in the database with no shortcodes. So by using the Bulk Actions drop-down on the Posts tab, I think you could conceivably clean your entire database with very little manual effort using this method. If you’re wondering why it works this way, the developer purposefully implemented the feature like this to prevent people from accidentally deleting shortcodes they wanted to keep.
Exploring The Other Shortcode Cleaner Settings
So far, I’ve kept things pretty basic. But Shortcode Cleaner gives you some other settings that differentiate it from other plugins and might come in handy in certain situations.
In the General Settings, you can enable the cleaner on the frontend and/or backend. And you can also:
- Ignore specific broken shortcodes
- Show broken shortcodes inside a specific HTML tag
- Force active shortcodes to appear as inactive
- Remove the actual content within broken shortcodes (by default, Shortcode Cleaner leaves this content behind)
- Remove content from only specific broken shortcodes
And in the Advanced Settings, you can choose which filters to use and even add your own custom content filters:
I imagine these settings should come in handy for developers working with more custom implementations.
How Much Does Shortcode Cleaner Cost?
Shortcode Cleaner is available at Code Canyon for $17, which I think is a fair price for how much time and hassle it can potentially save you.
Final Thoughts On Shortcode Cleaner
Shortcode Cleaner is a well-designed plugin that delivers on its promises. It makes it easy to hide or remove broken shortcodes from both your frontend and backend content.
And it does it with a well-designed dashboard that gives you plenty of smaller features for more control over exactly how and which shortcodes get removed.
If you find yourself in a situation where you need to hide or remove lots of broken shortcodes from both the frontend and backend of your site, this is the simplest solution I’ve found.