How to include files in Wordpress?

For example I want to include jQuery or FontAwesome.It is better to download the file FontAwesome, and then through function.php to connect or take a CDN and header.php connect. What is the best and why?
March 23rd 20 at 19:43
2 answers
March 23rd 20 at 19:45
CDN also need to connect via functions
And it is better to download via the CDN or to connect? - Myrna commented on March 23rd 20 at 19:48
How better it is for you to decide, there are many for and against

To connect something like this:

mytheme_scripts function() {

 wp_enqueue_style( 'google-fonts', '//,400,700', array(), null );
 wp_enqueue_style( 'style-main', get_template_directory_uri() . '/assets/css/main.css' , array(), null );
 wp_enqueue_script( 'custom-js', get_template_directory_uri() . '/assets/js/common.js', array('jquery'), null, true );

add_action( 'wp_enqueue_scripts', 'mytheme_scripts' );
- edmond25 commented on March 23rd 20 at 19:51
March 23rd 20 at 19:47
All connected via functions.php

Find more questions by tags WordPress