N
N
nanny_ogg2016-08-31 12:25:20
Fonts
nanny_ogg, 2016-08-31 12:25:20

How to properly connect Font Awesome?

I include font awesome like this

add_action('wp_head', 'add_scripts');
if (!function_exists('add_scripts')) {
  ...
  wp_enqueue_script('font_awesome', 'https://use.fontawesome.com/596a37ed18.js','','',true);
  ...
}

everything works, but the styles are automatically connected to it in the footer, and when the page loads, the icons are loaded with a second delay, which does not look very good. Is there anything you can do about it or deal with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Ksenia Mikhailova, 2016-08-31
@arizona

the fifth parameter "Whether to load in the footer" you set to true. Of course, it will load in the footer.
https://developer.wordpress.org/reference/function...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question