Removing broken shortcodes
-
Hi all,
I wonder if this question may be out of scope for this particular forum, but I figured I could ask anyway. I used to have an Amazon Associates plugin which would help me insert locale-specific Amazon links to products with the help of a shortcode. Unfortunately, the developer ceased work on this plugin a long time ago and it seems to be encountering errors with this version of WordPress (causing php errors to be thrown).
What I want to do is remove all these shortcodes – *actually* delete them, and not just hide them with the help of a plugin (seems to me that that method is like sticking a band-aid on without actually fixing the root issue). The problem is that each shortcode contains an ID which is different. Every shortcode takes the format of:
[amazon_link id=”XXXXXXXX” target=”_blank” ]Text Here[/amazon_link]
where “XXXXXXXX” is a different Amazon product ID.
What I’m after is some sort of SQL query which will help me remove these bad shortcodes directly from the post_content column in wp_posts table. Seems that you can’t use wildcards using UPDATE statement alas.
Does anyone know a way? Thanks all!
- The topic ‘Removing broken shortcodes’ is closed to new replies.