Home Forums WoodMart support forum FontAwesome Loaded Twice

FontAwesome Loaded Twice

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #81241

    Joe
    Participant

    Hey!

    I noticed that when using a WP Bakery button in my page and adding an icon to the button, it loads FontAwesome twice. (See attached)

    Any way to prevent this?

    Thank you!

    Attachments:
    You must be logged in to view attached files.
    #81292

    Artem Temos
    Keymaster

    Hi,

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    add_action( 'wp_enqueue_scripts', 'woodmart_child_enqueue_styles', 20000 );
    
    function woodmart_child_enqueue_styles() {
    	wp_dequeue_style( 'font-awesome-css' );
    }

    Regards

    #81348

    Joe
    Participant

    Thank you. Not a great option, since I use those icons on other pages where WP Bakery is not loading Font Awesome because I do not have anything in the page content that requires it.

    I’ll live with it for now, thank you.

    #81425

    Artem Temos
    Keymaster

    You are welcome.

Viewing 4 posts - 1 through 4 (of 4 total)