WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Disable includes/css/ui-lightness.css (11 posts)

  1. chrysgpc
    Member
    Posted 1 month ago #

    Hi,

    IS there a way I can prevent event manager loading the following CSS: includes/css/ui-lightness.css ?

    Thanks

    https://wordpress.org/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 1 month ago #

    try Events > Settings > General > Performance Optimization

  3. chrysgpc
    Member
    Posted 1 month ago #

    It doesn't work. Is this CSS loaded using the wp_enqueue_style method ?

  4. caimin_nwl
    NetWebLogic Support
    Posted 1 month ago #

    Yes, it is. You can see how it's done in events-manager.php.

  5. chrysgpc
    Member
    Posted 1 month ago #

    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

  6. angelo
    NetWebLogic Support
    Posted 1 month ago #

    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');
  7. chrysgpc
    Member
    Posted 1 month ago #

    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.

  8. caimin_nwl
    NetWebLogic Support
    Posted 1 month ago #

    Why do you need to stop that file loading? Maybe there's a workaround...

  9. chrysgpc
    Member
    Posted 1 month ago #

    I'm trying to disable this css because it conflicts with my theme.

  10. caimin_nwl
    NetWebLogic Support
    Posted 1 month ago #

    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 );
    }
  11. chrysgpc
    Member
    Posted 1 month ago #

    That works. Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic