Disable Dashicons on the front-end of the site

Disable dashicons from loading on the front-end unless an admin user on your child site.

Snippet Type

Execute on Child Sites

Snippet

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

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.