Dequeue nooz-basic-css style from unwanted pages
-
Hi Team,
Need to unload the Nooz related CSS and JS files from the unused Nooz plugin pages on my site. I have tried the post type as nooz_release in function.php and dequeue the nooz-basic CSS file.
But, still loading it on other pages. Please find the code below
add_action('wp_enqueue_scripts', 'unload_plugin_scripts'); function unload_plugin_scripts() { if (get_post_type() != 'nooz_release') { wp_dequeue_style( 'nooz-basic' ); } }
Please check this code and resolve my problem.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Dequeue nooz-basic-css style from unwanted pages’ is closed to new replies.