select2 css deregistering
-
Hello ! I am loading select2 on my child theme and have a custom style in place.
It seems like the plugin is also loading select2, rewriting my custom style.
I would like to not load select2.min.css twice (once in my child, once with the plugin) or being able to load my custom css after plugin’s select2.min.css. (the js file is only loaded once)
i saw this post and this code but it doesnt seem to work for me :
add_filter( 'um_dequeue_select2_scripts', 'um_dequeue_select2_scripts_fix', 10, 1 ); function um_dequeue_select2_scripts_fix( $bool ) { wp_dequeue_style( 'select2' ); wp_deregister_style( 'select2' ); wp_dequeue_script( 'select2.min.js'); wp_deregister_script('select2.min.js'); wp_dequeue_style( 'select2-css' ); wp_deregister_style( 'select2-css' ); wp_dequeue_script( 'select2.min.js-js'); wp_deregister_script('select2.min.js-js'); return $bool; }
Could you tell me how to do it ?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘select2 css deregistering’ is closed to new replies.