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' )) {
add_action( 'wp_enqueue_scripts', 'wpdocs_dequeue_dashicon' );
It may interest you:  What is a 301 Redirect? How Should You Use One?

Related Articles

Leave a Reply

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

Back to top button