Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Remove Divi shortcodes from content
* Remove Divi shortcodes from content
* @see
function remove_divi_shortcodes( $content ) {
$content = preg_replace('/\[\/?et_pb.*?\]/', '', $content);
return $content;

This comment has been minimized.

Copy link

commented Jan 27, 2018

What about this new plugin ( Shortcode Cleaner )
video demo:
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.