Last active
December 29, 2016 16:15
-
-
Save ArtfulPussycat/63d15aad76572d2efde4f2c5f3464adb to your computer and use it in GitHub Desktop.
Clean up DIVI shortcodes when switching to another themeFrom https://divi.space/divi-tutorials/lets-talk-about-removing-the-divi-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
function goodbye_divi_shortcode () { | |
$clean_content = get_the_content(); | |
$clean_content = preg_replace('/\[\/?et_pb.*?\]/','', $clean_content); | |
return $clean_content; | |
} | |
add_filter('the_content', 'goodbye_divi_shortcode', 99, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment