dequeue dashicons code example
Example: dequeue dashicons
// INSIDE YOUR THEME FUNCIONS.PHP FILE ->
function wpdocs_dequeue_dashicon() {
wp_deregister_style('dashicons');
}
add_action( 'wp_enqueue_scripts', 'wpdocs_dequeue_dashicon' );
// OR remove dashicons in frontend to non-admin
function wpdocs_dequeue_dashicon() {
if (current_user_can( 'update_core' )) {
return;
}
wp_deregister_style('dashicons');
}
add_action( 'wp_enqueue_scripts', 'wpdocs_dequeue_dashicon' );