Wordpress

Removing the WordPress dashicons.min.css code

Removing the WordPress dashicons.min.css code: Speed up your website by removing WordPress dashicons.min.css code

What is dashicons.min.css code?

It is the CSS file of the toolbar displayed by users who log into your website.

Why should we remove dashicons.min.css?

Since this CSS file is shown to everyone who visits your website, it causes the website speed to decrease. By removing the dashicons.min.css code, you can improve the Google Page Speed score and speed up the site.
-dashicons.min.css will only appear to admin
open the function.php file of your theme that you’re using and add the following code to the bottom line:

/* dashicons.min.css sadece admine görünsün */
add_action( 'wp_print_styles', 'tn_dequeue_dashicons_style' );
function tn_dequeue_dashicons_style() { 
wp_dequeue_style( 'dashicons' );
}
/* #dashicons.min.css sadece admine görünsün */

Complete removal of dashicons.min.css

// remove dashicons
function wpdocs_dequeue_dashicon() {
	if (current_user_can( 'update_core' )) {
	    return;
	}
	wp_deregister_style('dashicons');
}
add_action( 'wp_enqueue_scripts', 'wpdocs_dequeue_dashicon' );

It may interest you:  How to Change WordPress Domain Name?

Related Articles

Leave a Reply

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

Back to top button

takipçi satın al instagram takipçi satın al instagram beğeni satın al twitter takipçi satın al youtube abone satın al facebook takipçi satın al takipci33.com