Title: Dequeue Select2 styles
Last modified: January 10, 2022

---

# Dequeue Select2 styles

 *  Resolved [streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * (@streamworksaudio)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/dequeue-select2-styles/)
 * I am looking for a way to dequeue Dokan Lite’s select2 CSS styles.
 * WooCommerce already has it’s styles for select2 elements and my theme adds to(
   and overwrites) the WooCommerce select2 styles.
 * But in some spots the Dokan Lite plugin is overwriting our theme’s select2 styles–
   for example on the Edit Address page the Dokan styles are applied to the select2
   elements, but on the checkout (billing) form our theme’s styles are applied.
 * While on Dokan Dashboard pages (for example the edit product page) the styles
   are a mix of Dokan’s style and our theme’s.
 * I would like to dequeue Dokan’s select2 styles and just have my theme (and WooCommerce)
   apply styles.
 * I see that the function ‘register_all_scripts’ on the assets.php is what is used
   to load the styles, but I cannot figure out how to filter which styles are loaded.
 * Cheers

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

 *  Plugin Support [Jahidul Hassan Mojumder](https://wordpress.org/support/users/jahidulhassan/)
 * (@jahidulhassan)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/dequeue-select2-styles/#post-15234698)
 * Hi [@streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * To dequeue the style for select2 elements enqueued by Dokan, you can add the 
   below-mentioned code in your child theme’s **functions.php** file.
 *     ```
       function dequeue_dokan_select2_stylesheet(){
           wp_deregister_style( 'dokan-select2-css' ); //Name of Style ID wihtout css.
       }
       add_action( 'wp_enqueue_scripts', 'dequeue_dokan_select2_stylesheet', 999 );
       ```
   
 * I hope this helps. Thanks!
 *  Thread Starter [streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * (@streamworksaudio)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/dequeue-select2-styles/#post-15235692)
 * Thanks [@jahidulhassan](https://wordpress.org/support/users/jahidulhassan/)
 * That does remove the styles, however it appears that on the Dokan dashboard then
   only load my theme’s select2 styles and not WooCommerce’s (need both WooCommerce
   and my theme’s).
 * Need to find a way to remove the Dokan select2 styles from just certain pages(
   i.e WooCommmerce pages).
 *  Thread Starter [streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * (@streamworksaudio)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/dequeue-select2-styles/#post-15235739)
 * This is working for the WooCommerce account page…
 *     ```
       add_action('wp_enqueue_scripts',function(){
       	if ( is_account_page() ) :
       	wp_deregister_style( 'dokan-select2-css' );
       	endif;
       });
       ```
   
 * Perhaps there is a function that checks to see if the user is on the Dokan Dashboard?
   If so then I can load the dokan select2 styles on the dashboard page only.
 * Cheers
 *  [Shafinoid](https://wordpress.org/support/users/shafinahmad01/)
 * (@shafinahmad01)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/dequeue-select2-styles/#post-15261625)
 * Hello [@streamworksaudio](https://wordpress.org/support/users/streamworksaudio/)
 * Thank you for reaching us.
 * I have checked the codebase and as per my knowledge, I am unable to find any 
   functions that can meet your requirements completely. I believe you will need
   to perform customizations on the codebase to achieve your requirements.
 * Moreover, I am resolving this topic as the query is being satisfied. Feel free
   to create another one anytime.
 * Best Regards!

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

The topic ‘Dequeue Select2 styles’ is closed to new replies.

 * ![](https://ps.w.org/dokan-lite/assets/icon-256x256.gif?rev=3239229)
 * [Dokan: AI Powered WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy](https://wordpress.org/plugins/dokan-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dokan-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dokan-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/dokan-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dokan-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dokan-lite/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Shafinoid](https://wordpress.org/support/users/shafinahmad01/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/dequeue-select2-styles/#post-15261625)
 * Status: resolved