From f5eb6dc813d81400f079d2f84374f31222d1ec6d Mon Sep 17 00:00:00 2001 From: Gabriel Date: Mon, 3 Jun 2024 16:36:03 +0200 Subject: [PATCH] Fix remove divi shortcode crap --- functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.php b/functions.php index ee2ca1a..a4412cd 100755 --- a/functions.php +++ b/functions.php @@ -28,6 +28,13 @@ function hello_elementor_child_enqueue_scripts() { } add_action( 'wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts' ); +/** Remove divi shortcode crap **/ + +function remove_divi_shortcodes( $content ) { + $content = preg_replace('/\[\/?et_pb.*?\]/', '', $content); + return $content; +} +add_filter('the_content', 'remove_divi_shortcodes', 20, 1); /********** Autres personnalisations **********/