Created
August 9, 2017 01:37
-
-
Save jfarsen/beab40491848dc161436eaa6a86b95f2 to your computer and use it in GitHub Desktop.
Remove Divi shortcodes from content
This file contains hidden or 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 | |
/** | |
* Remove Divi shortcodes from content | |
* | |
* @see http://victorfont.com/remove-divi-shortcodes-changing-themes/ | |
*/ | |
function remove_divi_shortcodes( $content ) { | |
$content = preg_replace('/\[\/?et_pb.*?\]/', '', $content); | |
return $content; | |
} |
This plugins works really well. best solutions so far to move away from Divi/Avada etc..
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What about this new plugin ( Shortcode Cleaner )
https://plugins.jozoor.com/shortcode-cleaner/
video demo: https://www.youtube.com/watch?v=dXVZ5bSUduc
It easily removes Divi shortcodes automatically when changing it to a new theme.
It removes unused, broken shortcodes from WordPress, so you can switch between themes and plugins without worrying and keep your content cleanly and fresh all the time, it is dealing with any theme (Divi, Avada, ..etc) shortcodes that are left when changing themes or plugins.
I think it will be useful for any site.