add script wordpress code example
Example 1: wordpress header script add
/* INSIDE YOUR functions.php theme file -> Add to header some code */
add_action('wp_head', 'your_function_name');
function your_function_name(){
?>
PASTE HEADER CODE HERE
<?php
};
Example 2: include script in wordpress
wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true);