Title: Dequeue Scripts/Styles
Last modified: February 13, 2023

---

# Dequeue Scripts/Styles

 *  Resolved [egornmore](https://wordpress.org/support/users/egornmore/)
 * (@egornmore)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/)
 * Hello, I noticed that plugin scripts and styles are loaded on every page even
   if it’s not used. How can I dequeue scripts and styles?
 * `/plugins/contact-form-7-multi-step-pro//assets/frontend/css/cf7mls.css?ver=2.6.8-
   > 2.10B /plugins/contact-form-7-multi-step-pro//assets/frontend/css/progress_bar.
   css?ver=2.6.8 -> 5.56KB /plugins/contact-form-7-multi-step-pro//assets/frontend/
   animate/animate.min.css?ver=2.6.8 -> 4.89KB`
 * Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Support [alina98](https://wordpress.org/support/users/alina98/)
 * (@alina98)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16466654)
 * Hi [@egornmore](https://wordpress.org/support/users/egornmore/) ,
   Thanks for 
   reaching out!Please let me check this with the dev and I will feed you back as
   soon as possible.Kind regards,Alina
 *  Plugin Support [mialewp](https://wordpress.org/support/users/mialewp/)
 * (@mialewp)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16467946)
 * Hi [@egornmore](https://wordpress.org/support/users/egornmore/) ,
 * Thanks for your patience. In frontend there is no way to determine which exactly
   page has been used contact form to load scripts file and styles. Even Contact
   form 7 also works like this. But you can try by referring to this doc [https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/](https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/)
   
   Hope that clears. If you need further help, please let us know.Many thanks!Mia
 *  Thread Starter [egornmore](https://wordpress.org/support/users/egornmore/)
 * (@egornmore)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16469051)
 * Hi [@mialewp](https://wordpress.org/support/users/mialewp/),
 * I can target the page manually, by is_page(id). Should dequeue be something like
   that – `remove_action('wp_enqueue_scripts', 'cf7mls', 20, 0);` ?
 *  Plugin Support [alina98](https://wordpress.org/support/users/alina98/)
 * (@alina98)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16469089)
 * Hi [@egornmore](https://wordpress.org/support/users/egornmore/) ,
 * Please use this function:
 *     ```wp-block-code
       wp_dequeue_script( 'cf7mls' )
       ```
   
 * Kind regards,
   Alina
    -  This reply was modified 3 years, 3 months ago by [alina98](https://wordpress.org/support/users/alina98/).
 *  Thread Starter [egornmore](https://wordpress.org/support/users/egornmore/)
 * (@egornmore)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16469253)
 * Tried `wp_dequeue_style( 'cf7mls-css' );`, `wp_dequeue_style( 'cf7mls' );`,`wp_dequeue_script('
   cf7mls' );` but styles and scripts still there
    -  This reply was modified 3 years, 3 months ago by [egornmore](https://wordpress.org/support/users/egornmore/).
 *  Plugin Support [alina98](https://wordpress.org/support/users/alina98/)
 * (@alina98)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16469384)
 * Hi [@egornmore](https://wordpress.org/support/users/egornmore/) ,
 * Please let me check this with the dev and I will feed you back as soon as possible.
 * Kind regards,
   Alina
 *  Plugin Support [mialewp](https://wordpress.org/support/users/mialewp/)
 * (@mialewp)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16471782)
 * Hi [@egornmore](https://wordpress.org/support/users/egornmore/) ,
 * Please try to use this code
 * add_action( ‘wp_enqueue_scripts’, ‘remove_cf7mls_scripts_and_style’ );
 * function remove_cf7mls_scripts_and_style() {
 * wp_dequeue_style( ‘cf7mls-css’ );
 * wp_dequeue_style( ‘cf7mls’ );
 * wp_dequeue_script( ‘cf7mls’ );
 * }
   If you have any questions, feel free to contact us.Many thanks!Mia
 *  Thread Starter [egornmore](https://wordpress.org/support/users/egornmore/)
 * (@egornmore)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16473025)
 * Hi [@mialewp](https://wordpress.org/support/users/mialewp/) that solution works
   for me, thanks!
 * Also added animate and progress bar styles:
 * `add_action( 'wp_enqueue_scripts', 'remove_cf7mls_scripts_and_style' );`
 * `function remove_cf7mls_scripts_and_style() {
   if(!is_page($id)) {wp_dequeue_style('
   cf7mls');wp_dequeue_script('cf7mls');wp_dequeue_style('cf7mls_animate');wp_dequeue_style('
   cf7mls_progress_bar');}}
    -  This reply was modified 3 years, 3 months ago by [egornmore](https://wordpress.org/support/users/egornmore/).
    -  This reply was modified 3 years, 3 months ago by [egornmore](https://wordpress.org/support/users/egornmore/).

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Dequeue Scripts/Styles’ is closed to new replies.

 * ![](https://ps.w.org/cf7-multi-step/assets/icon-256x256.png?rev=2775701)
 * [Multi Step for Contact Form 7](https://wordpress.org/plugins/cf7-multi-step/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-multi-step/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-multi-step/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-multi-step/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-multi-step/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-multi-step/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [egornmore](https://wordpress.org/support/users/egornmore/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/dequeue-scripts-styles/#post-16473025)
 * Status: resolved