• Resolved jarstern

    (@jarstern)


    Hello! I am trying to disable the css files the plugin loads that are unused for my purposes. For some reason, I’m not able to do so. Can you let me know what might be the issue?

    function remove_plugin_stylesheet() {
        wp_dequeue_style( 'uacf7-frontend-style-css' );
        wp_deregister_style( 'uacf7-frontend-style-css' );
    	wp_dequeue_style( 'uacf7-remixicon-css' );
        wp_deregister_style( 'uacf7-remixicon-css' );
    	wp_dequeue_style( 'uacf7-fontawesome-4-css' );
        wp_deregister_style( 'uacf7-fontawesome-4-css' );
    	wp_dequeue_style( 'uacf7-fontawesome-5-css' );
        wp_deregister_style( 'uacf7-fontawesome-5-css' );
    	wp_dequeue_style( 'uacf7-fontawesome-6-css' );
        wp_deregister_style( 'uacf7-fontawesome-6-css' );
    }
    add_action( 'wp_enqueue_scripts', 'remove_plugin_stylesheet', 9999);

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author mdashikul

    (@mdashikul)

    Hi @jarstern – I hope you’re doing well. Could you please verify the wp_dequeue_style handler? For example, use (uacf7-frontend-style) without adding an extra (-css) after the handler. WordPress automatically appends a file type extension to the handler by default.

Viewing 1 replies (of 1 total)
  • The topic ‘Dequeue and Deregister CSS Files’ is closed to new replies.