How to Fix Broken Shortcodes, Links (or Any other element) in WordPress in Just 5 Minutes

I recently changed the theme of my blog. It is an amazing theme but it broke all the previous Shortcodes on my blog.

And there are literally hundreds of Shortcodes. I knew that at some point in time, I had to change the theme. That is why  I used Ultimate Shortcodes plugin for that.

Because the theme based shortcodes would break and shortcodes created from plugins like Ultimate Shortcode will keep working. So, I chose a Plugin because I wanted this flexibility of changing the themes.

Find_Replate_in_database_02

But the theme I am using has its own set of shortcodes, and the codes are mostly the same, which results in breaking the shortcodes here and there. I actually realised it a few weeks later when I had to edit an old post.

Now I was stuck because,

a) I had invested in a premium theme,

b) I spent some good time to customise the theme and was quite happy with the result.

So, changing the theme was not an option. And I decided to fix the short codes manually by changing them.

Shortcode Ultimate plugin gives you an option to add a prefix to the codes so that they become unique.

Note: I recommend every one to add a prefix when they start using Ultimate Shortcode, just to be sure, nothing like this happens.

So, if su_ is added to all the shortcodes, all of them would come back to life. But going to every post and editing them is a very boring task. Especially when there are 400+ posts to take care of.

How to fix broken shortcodes in 5 minutes

Fortunately, there is a way to automate this. We all know the functionality of Search & Replace.

And I found a plugin that Search & Replaces a word in the database.

What does this mean for you?

For non-technical people, the database contains every information of a blog in text format, and this plugin searches for a word and replaces with a word you type.

Which means,

Find_Replate_in_database_04

Note: First I’ve to add the prefix Su_ in the Shortcode Ultimate settings before going further.

If I search for Note and replace is it Su_Note the codes would start working.

Find_Replate_in_database_01

So, I install the plugin from the plugin area and activate it, the settings of the plugin can be found under the tools section.

Find_Replate_in_database_05

Now type the word of the short code and replace it with su_code (where the code can be Note, Button, Table or any other code). as shown in the image below.

Find_Replate_in_database_06

When I go back, I can see the short code is back to life.

Find_Replate_in_database_08

So, with this trick, we can pick the broken shortcodes to type it for search and enter the new version in replace area.

Find_Replate_in_database_09

I saved several hours of my work time by fixing broken shortcodes in just 5 minutes.

Find_Replate_in_database_10Find_Replate_in_database_07

This plugin is also helpful in fixing broken links, changing the URLs. or any other elements.

Footnotes

Download Shortcode Ultimate 

Download Search & Replace

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

NO COMMENTS

LEAVE A REPLY