• Resolved Davi91

    (@davi91)


    I need to override a lot of CSS files, including jquery-ui.css, that is breaking my whole layout.

    It is possible to dequeue some CSS files from the plugin?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Davi91

    (@davi91)

    Yeah, a nice solution could be to add some prefix for jquery-ui items used by the plugin.

    ??

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @davi91

    It may be difficult to dequeue the um_ui (jquery-ui.css) style because it is a deps for other styles.

    Try to register your own um_ui style before the Ultimate Member plugin does this. Use this code:

    add_action( 'wp_enqueue_scripts', function() {
    
    	// Change this url to your custom jquery-ui.css file.
    	$url = '/wp-content/plugins/ultimate-member/assets/libs/jquery-ui/jquery-ui.css';
    
    	wp_register_style( 'um_ui', $url, array(), '1.12.1' );
    }, 8 );

    You can change what you need in your custom jquery-ui.css file.

    Regards

    Thread Starter Davi91

    (@davi91)

    But, this will load only my own jquery-ui file? Or both files?

    Anyway, it’s cool to keep your CSS files with your base components working, the problem appears when there is other sections (even URLs with no UM Components) that are using jQuery UI Components. This second group is getting styled by UM CSS files, when they’re totally different.

    It’s doable to add some prefix to your jQuery UI Components? Like the datepicker, for example… So we can use your datepicker in the user profile and a new datepicker in other part of the web with different styles without overrides.

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    WordPress can not register two styles with the same name. So, WordPress will not register and load our um_ui (jquery-ui.css) style if you register your own earlier. This is a trick you can use because you can not just dequeue this style.

    The jquery-ui.css is not our own file, it is a part of the jQuery UI library. We use it as it is.

    Regards

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    I asked a lead developer to update the jQuery UI library styles and add the prefix in the future release.

    Thank you

    A prefix would be perfect!

    Plugin Support andrewshu

    (@andrewshu)

    Hi @davi91

    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 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Remove some CSS files’ is closed to new replies.