Use Dashicons on frontend in WordPress

How to load properly Dashicons on frontend

I mean properly because if you test it only on a computer you could see them even if the dashicons font is not registered , test your site on a tablet first.

Add this code in the functions.php of you child theme  and dashicons appear everywhere

add_action( 'wp_enqueue_scripts', 'load_dashicons_front_end' );
function load_dashicons_front_end() {
wp_enqueue_style( 'dashicons' );

then you can go here


and you can choose the icon , for example

<span class="dashicons dashicons-menu"></span>

or this

<div class="dashicons dashicons-menu"></div>

is for showing this icon