I'm creating a word press theme, in my functions.php file I have the following script (see below)
My aim is run this script to include the Google fonts, shiv and respond.js in the HTML 'Head' , in exactly the same way as a static site.
Do I need to call this function from the head of every WordPress page, or is there a more efficient way to achieve this goal?
If so, can someone demonstrate how this would work?
****Aim : I want to run this function for every PAGE, so that Google fonts, shiv and respond.js all appear in my HTML HEAD****
function jlc_scripts() {
wp_enqueue_style( 'googlewebfonts', 'http://fonts.googleapis.com/css?family=Open+Sans;' );
echo '<!--[if lt IE 9]>';
echo ' <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>';
echo ' <script stc="'. TEMPPATH.'/js/respond.min.js"></script>';
echo '<![endif]-->';
}
add_action( 'wp_enqueue_scripts', 'mf_scripts' );