HomeTips & Tricks How to Remove Block Library CSS File from WordPress

How to Remove Block Library CSS File from WordPress

Hi, in this topic i gonna tech you about how we can remove or delete default WP Block Library .css file from our WordPress public website, This Gutenberg editor, that is the default editor for on our WordPress website installations, uses special CSS libraries to manage blocks on our website’s front-end. in all WordPress Website it will automatically added this library CSS code on our WordPress website but if you want to remove this anytime you can just simply you need to add some function code into your functions.php file inside from your installation themes.

How to Remove Block Library CSS File from WordPress Site step by step
How to Remove Block Library CSS File from WordPress Site step by step

For example See te code below.

<link rel=’stylesheet’ id=’wp-block-library-css’ href=’https://mywphelper.com/wp-includes/css/dist/block-library/style.min.css?ver=5.3.2′ type=’text/css’ media=’all’ />

Now Copy and paste the following code into your functions.php file from your WordPress themes folder.

function wpassist_remove_block_library_css(){
wp_dequeue_style( ‘wp-block-library’ );
}
add_action( ‘wp_enqueue_scripts’, ‘wpassist_remove_block_library_css’ );

Do you want to add the above function code direct from WordPress Dashboard? So then First login to your WP Dashboard and go to the “Appearance” and click on “Theme Editor” options from under the Appearance Menu.

WordPress Themes Editor functions
WordPress Themes Editor functions

Now find the “functions.php” named file from right corner and click on that and add the code end section inside file’s.

Now finally Update and save your work.

In the end

I hope you have found this article helpful. Let us me your opinion or questions if any through the comment form in below or use this form to ask your question.

You May Also Like

About the Author: Kedar Adhikari

I am WordPress Themes developer and designer and also any type of website design with minimum cost. for more information you can contact me on email [email protected]

Leave a Reply

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

Copyright © 2024 My WP Helper. All rights reserved.