Posted inwordpress / CSS / JavaScript / jQuery / php

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.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype