• I have migrated an old WP website to a new server and into a new theme.
    The old site was build with a page builder, and now in the new setup, this pagebuilder (Visual Composer) is not present anymore, so the entire site content is filled with VC shortcodes and the all need to be removed.

    Simply deleting them is a hell of a job, since the website has 1000+ pages(!) and at least six shortcodes on every page.
    Does someone have an idea if there is a faster way then doing this manually?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Your best bet will probably be to use a search & replace plugin. Just remember to backup the database before you actually make any replacements.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    One option is to write a simple plugin that effectively “no ops” the shortcodes…

    function vc_noop( $atts, $content) {
       return $content;
    }

    Then do an add_shortcode for each shortcode you find. That might be easier than trying to get the regex right to find and remove all shortcodes. This just requires making a list of the shortcodes. HOWEVER, as an awful lot of stuff probably got put on pages via those arguments, the cleanest thing to do is actually edit the pages. Sorry… such are the bad paths one finds when using visual builders. (That last is my opinion and may not be widely shared. 🙂 )

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Batch remove shortcodes’ is closed to new replies.