Created
April 6, 2017 03:11
-
-
Save bpmore/85f5a32096218382fbb946d1f1166fb5 to your computer and use it in GitHub Desktop.
remove fusion builder shortcodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('the_content', 'remove_fusion_shortcodes', 20, 1); | |
function remove_fusion_shortcodes( $content ) { | |
$content = preg_replace('/\[\/?fusion.*?\]/', '', $content); | |
return $content; | |
} | |
?> | |
**Tested with WP All Import and Export** |
Please can you help me to understand how can i use this code? I want to move from a very old version of AVADA to Divi, and I want to remove all the [fusion_builder... ] shortcodes. It looks like this tiny snippet can do the job, but I really don't know how to use it.
Thanks! Regards
Hello lucagiai,
It's not the best place to look for this kind of help, you should go to a forum rather than on GitHub.
But if you want to use this code, you should copy the code between the tags and past it inside your child theme's function.php file.
Have fun
Thomas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes, there is a
[fusion_code]...[/fusion_code]
shortcake. You'd better change your regex for/\[fusion_code\].*\[\/fusion_code\]|\[\/?fusion.*?\]/
(I'm not the best regex-dev, but this one works!)