How to disable/turn off specific css in wordpress?

in wordpress turn off specific css, It is best flexible. You can do tons of things as well as some need base customization with it. When plugin activated, some useful latest plugins automatically google or any other ads their main css stylesheet to your WordPress website. This is best in most cases, but it is a lot available cleaner to have all your some clear cache css styles in single stylesheet i also learn to remove unused css wordpress plugin.

Question: How can you remove a CSS file that was registered with wp_enqueue_style ?

There are best simple way to disable specifics plugin’s stylesheet or remove unused css wordpress.

Step 1: wordpress turnoff specific css

Open plugin file and look for code starting with wp_enqueue_style ( $handle, $src, $deps, $ver, $media );. Look for handle name.

Sample Example: If you are using Redirection Plugin, look for below some line of source code and then get handle name main redirection .

wp_enqueue_style( 'redirection', plugin_dir_url( __FILE__ ).'admin.css', $this->version() );

Also Read : How to Enable Theme and Plugin Editor in WordPress?

Step 2: Add Code In functions.php

here simple you can Open functions.php file and the simply enter below added source code:

add_action( 'wp_print_styles', 'deregister_my_styles', 100 );
 
function deregister_my_styles() {
	wp_deregister_style( 'redirection' );
}

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about How to Disable CSS and Javascript Files in WordPress?.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1.   PHP Laravel Interview Questions and Answers
  2.   How to Open URL in New Tab using ReactJS
  3.   Cross Header Access Control Allow Origin missing
  4.   failed to load resource: the server responded with a status of 404 (not found)
  5.   WooCommerce Get $product object from product ID
  6.   install PHP Accelerator in Xampp - prestashop
  7.   jquery remove last comma from string Example
  8.   Wordpress Plugin uninstall hook - register_uninstall_hook()
  9.   Simple Create WordPress Plugin Tutorial
  10.   woocommerce_payment_complete Hooks
Tags:, , , , ,