Caricare css e javascript in function php (nell'esempio carico una font di google font, ed un css personale ) e nel secondo file un file javascript
function Vue_scripts() {
wp_register_script( 'Vue', '//cdn.jsdelivr.net/npm/vue', false, false, true );
wp_enqueue_script( 'Vue' );
}
add_action( 'wp_enqueue_scripts', 'Vue_scripts' );
function myScript(){
wp_register_script('myScrypt_jQ', get_stylesheet_directory_uri().'/js/scriptjq.js',array('jquery'),'', true);
wp_enqueue_script('myScrypt_jQ');
}
add_action('wp_enqueue_scripts','myScript');
function myScript(){
wp_register_style('RougeFontGoogle', '//fonts.googleapis.com/css?family=Rouge+Script');
wp_enqueue_style('RougeFontGoogle');
wp_register_style('myComponent', get_stylesheet_directory_uri().'/miostyle.css');
wp_enqueue_style('myComponent');
}
add_action('wp_enqueue_scripts','myScript');