try Events > Settings > General > Performance Optimization
It doesn’t work. Is this CSS loaded using the wp_enqueue_style method ?
Yes, it is. You can see how it’s done in events-manager.php.
I’m trying to disable the css using the following code but it does not work:
function my_deregister_styles() {
wp_deregister_style( ‘ui_css’ );
}
add_action( ‘wp_print_styles’, ‘my_deregister_styles’, 100 );
Any help would be appreciated.
Thanks
try something like this
function my_em_remove_css(){
wp_dequeue_style('events-manager', plugins_url('includes/css/events_manager.css',__FILE__));
}
add_action('init','my_em_remove_css');
It doesn’t work for me. And I assume the purpose of these command lines is to disable the whole event manager css whereas I was trying to disable only “ui-lightness.css”. Anyway if there is no way to disable only that CSS I’ll find a workaround.
Thanks.
Why do you need to stop that file loading? Maybe there’s a workaround…
I’m trying to disable this css because it conflicts with my theme.
This is working for me:
add_filter( 'em_wp_localize_script', 'em_css_fix', 1, 2 );
function em_css_fix( $em_localized_js ) {
$em_localized_js['ui_css'] = '';
return( $em_localized_js );
}