“dequeue” styles and scripts for frontend optimisation?
-
Hi WP Go Maps (formerly WP Google Maps) team, hope you all doing well.
Recently I am using this plugin for integrating maps. But I have seen there are so many scripts and styles loaded in frontend and I don’t think that default methods are able to block them.
I have tried below code :function dequeue_wp_google_maps_styles_scripts() { wp_dequeue_style('fontawesome'); wp_dequeue_style('datatables'); wp_dequeue_style('wpgmaps_datatables_responsive-style'); wp_dequeue_script('datatables'); wp_dequeue_script('datatables-responsive'); wp_dequeue_script('javascript-cookie'); } add_action('wp_enqueue_scripts', 'dequeue_wp_google_maps_styles_scripts', 9999999);
Initially may be need to control for better performance of frontend I don’t required some part like fontawesome, datatables and so on…
So please let me know how to get it done.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘“dequeue” styles and scripts for frontend optimisation?’ is closed to new replies.