dequeue style files
-
Hello tobiasbg,
In order to try and improve performance on my website, I’m checking the plugin I have installed one by one and dequeue / enqueue each css / js files depending on the posts where they are required.
Regarding TablePress plugin, I was already able to find out how to achieve that for several css files :
wp_dequeue_style( 'datatables-row-details' ); wp_dequeue_style( 'tablepress-columnfilterwidgets-css' ); add_filter( 'tablepress_use_default_css', '__return_false' ); $tablePressPostId = array(62, 65); if (in_array(get_the_ID(), $tablePressPostId)){ wp_enqueue_style ('datatables-row-details', '/wp-content/plugins/tablepress-datatables-row-details/datatables-row-details.min.css?ver=1.0'); wp_enqueue_style ('tablepress-columnfilterwidgets-css', '/wp-content/plugins/tablepress-datatables-column-filter-widgets/css/ColumnFilterWidgets.min.css?ver=1.2'); add_filter( 'tablepress_use_default_css', '__return_true' ); }But I’m still trying to find out how to dequeue / enqueue the one below please?
wp-content/tablepress-custom.min.css?ver=39Thank you for your help.
Best regards,
Stephane.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘dequeue style files’ is closed to new replies.