The first thing to do is to open the plugin file and find the code which include a plugin-specific stylesheet in the blog header. This function is called wp_enqueue_style(). For example, in case of the useful wp-pagenavi plugin, the code to find is:
wp_enqueue_style('wp-pagenavi', get_stylesheet_directory_uri().'/pagenavi-css.css', false, '2.50', 'all');
What we need to find is the handle. The handle is the first argument of the wp_enqueue_style() function, so in the previous example, wp-pagenavi is the handle we need.
Once done, open your functions.php file and paste the following code in it:
add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
function my_deregister_styles() {
wp_deregister_style( 'wp-pagenavi' );
// deregister as many stylesheets as you need...
}
Thanks to Justin Tadlock for this great recipe!
Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!
WordPress trick: Disable plugin stylesheet
No comments yet, be the first one to post comment.