Skip to content

Instantly share code, notes, and snippets.

@ethangardner
Created May 6, 2015 20:50
Show Gist options
  • Save ethangardner/27aaa49c092b863e6e84 to your computer and use it in GitHub Desktop.
Save ethangardner/27aaa49c092b863e6e84 to your computer and use it in GitHub Desktop.
Loading scripts in header.php (not recommended)
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<!-- JS -->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/modernizr.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/script.js"></script>
<!--[if lte IE 8]>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/html5shiv.min.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/respond.min.js"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<?php
// Rest of the template would go here...
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment