WordPress Dequeue CSS with high priority

Arun - 02/06/2020 2:39 PM

For removing css from plugins which have included it with high priority.

Add priority number in add_action hook.

Files 1

functions.php
php
<?php

function dequeue_dequeue_plugin_style(){

	    wp_dequeue_style( 'kc-general' ); //Name of Style ID.
	    wp_dequeue_style( 'kc-animate' ); //Name of Style ID.
	    wp_dequeue_style( 'kc-icon-1' ); //Name of Style ID.
	    wp_dequeue_style( 'page-list-style' ); //Name of Style ID.
	    wp_dequeue_style( 'hocwp-pagination-style' ); //Name of Style ID.


}
add_action( 'wp_enqueue_scripts', 'dequeue_dequeue_plugin_style',90000);