Can i Deregister and dequeue wpb_composer_front_js in the front end website
-
I found below script in woodmart/functions.php:
wp_enqueue_script( ‘wpb_composer_front_js’, false, array(), $version );
This is good for my clients editing stuff in the back end, but it also adds unnecessary JS to every page load on the front end. Can I remove it in front end only?
Will it cause any problem?
Please advise.
Thank you.
Attachments:
You must be
logged in to view attached files.
Hello,
Thank you so much for contacting our support center.
Try to add the following PHP code snippet to the child theme functions.php file to do this
function woodmart_dequeue_script() {
wp_dequeue_script( 'wpb_composer_front_js' );
wp_deregister_script( 'wpb_composer_front_js' );
}
add_action( 'wp_enqueue_scripts', 'woodmart_dequeue_script', 11000 );
Regards
The topic ‘Can i Deregister and dequeue wpb_composer_front_js in the front end website’ is closed to new replies.