• Resolved emmamiumiu

    (@emmamiumiu)


    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)
  • @emmamiumiu

    You can look at the function register_scripts() at line 89 in
    .../plugins/ultimate-member/includes/core/class-enqueue.php

    Plugin Support andrewshu

    (@andrewshu)

    Hi @emmamiumiu

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘select2 css deregistering’ is closed to new replies.