i have customized my .html as a custom wp theme. i have these scripts in my header.php:
<script type='text/javascript' src="scripts/jquery-1.8.2.js"></script>
<script type='text/javascript' src='scripts/jquery.easing.1.3.js'></script>
<script type='text/javascript' src='scripts/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='scripts/diapo.js'></script>
<script type="text/javascript" src="scripts/scripts.js"></script>
<!--[if !IE]><!--><script type='text/javascript' src='scripts/jquery.mobile-1.0rc2.customized.min.js'></script><!--<![endif]-->
<!-- html5.js for IE less than 9 -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
I am really new in all these wp customization stuff and i am struggling through dozens of tutorials by great minds out there sharing their knowledge. after a quite long search before posting here, i see that the right way including these files is registering and queuing them inside my functions.php file.
so, my "functions.php" has this:
function load_javascript_files() {
//Register the script like this for a theme:
wp_register_script('easing', get_template_directory_uri() . 'http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js', array('jquery'), '1.3', true);
wp_register_script('hoverIntent', get_template_directory_uri() . '/js/jquery.hoverIntent.minified.js', array('jquery'), true);
wp_register_script('jquery-mob-custom', get_template_directory_uri() . '/js/jquery.mobile-1.0rc2.customized.min.js', array(jquery), true);
wp_register_script('home-page-slideshow', get_template_directory_uri() . '/js/diapo.js', array('jquery'), true);
wp_register_script('custom-script', get_template_directory_uri() . '/js/custom-script.js', array('jquery'), '1.0', true);
wp_enqueue_script('easing');
wp_enqueue_script('hoverIntent');
wp_enqueue_script('custom-script');
global $is_IE;
if ( $is_IE ) {
wp_enqueue_script('jquery-mob-custom');
}
if(is_front_page()) {
wp_enqueue_script('home-page-slideshow');
}
}
add_action('wp_enqueue_scripts', 'load_javascript_files');
?>
Any help of understanding what i am doing wrong here is really appreciated
get_template_directory_uri()
to an absolute URL.