0

I'm using the Genesis Framework on my website. I disabled the dashicons from loading on the front-end using the code below in my functions.php file:

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

but i noticed my mobile/tablet views are now missing icons. More particularly, the hamburger menu and the down arrow for a dropdown.

Here's how it looks like --> https://www.dropbox.com/s/7azuj6vraehzll5/dashicons.png?dl=0

I'm not using the dashicons on my desktop version that's why i disabled it (because it's causing my site to load slowly using website speed tests).

Is there a way to load dashicons only on mobile? Or at least those two icons? or via css? I can't seem to find any. All my googling shows me how to add them (which i don't).

The only reason I want them to load on mobile is to the hamburger menu icon and a down arrow is the best representation that that's a menu and an option avaialable.

aylim14
  • 49
  • 8
  • So just load a hamburger icon and an arrow icon, and use them in the code. – Stender Jan 16 '20 at 07:08
  • or create a function that uses preg_match on the `$_SERVER["HTTP_USER_AGENT"]` - like this : https://stackoverflow.com/a/10989524/4244684 – Stender Jan 16 '20 at 07:12

0 Answers0