Site logo

Archived topic

Removing Dashicon code snippet from my website

1 reply · Started by Elizabeth on February 14, 2022

Viewing posts 1–2 of 2

Hi,
I have Falcon plug-in installed on my wp dashboard to remove Dashicons, but there is still a snippet of coding showing on my site and it's causing my LCP to be slower than it needs to be. I have searched for ways to remove the snippets of Dashicon coding, but I'm really not technically-minded enough to even make a start.
Do you have any ideas of how to remove it? Is there something you can do at your end to help? I know that GeneratePress doesn't use Dashicons, I am guessing that they are present from my previous theme.
My website is bytherfarm.com
Kindest,
Liz

Hi there,

try adding this PHP Snippet:

add_action( 'wp_enqueue_scripts', 'db_dequeue_dashicons' );
function db_dequeue_dashicons() {
    if ( ! is_user_logged_in() ) {
        wp_deregister_style( 'dashicons' );
    }
}

This article explains how to add it: https://docs.generatepress.com/article/adding-php/

This archived topic is closed to new replies.