Skip Navigation

[Resolved] Font awesome loaded multiple times

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Tagged: 

This topic contains 1 reply, has 1 voice.

Last updated by bobA-2 6 years, 9 months ago.

Author
Posts
#623973

In the source code on my homepage I see this

<link rel='stylesheet' id='font-awesome-css' href='hidden link' type='text/css' media='screen' />

I am also using the Better Font awesome plugin so the font-awesome.min.css is loaded twice which I want to stop.

I found the code below and added it to my themes function file and cleared cache. But the Toolset fontawesome reference still shows up. Should it not be removed with that code?

add_action('types_after_init', 'my_func', 999);
function my_func(){
    wp_deregister_style( 'font-awesome' );
    wp_deregister_style( 'font-awesome-css' );
}
#623979

Never mind this seems to work

add_action( 'wp_enqueue_scripts', function() {
 wp_deregister_style('font-awesome');
}, -1 );

The forum ‘Types Community Support’ is closed to new topics and replies.