js in header on certain page only
-
Hi,
I am trying include a javascript file in my header.php file, but for a certain page only (a page with the slug ‘band’).I have roughed out the code (my php isn’t too hot), but it is not working correctly, where am I going wrong?
<?php if (is_page('band')) {
echo "<script language="JavaScript" type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/ttca.js"></script>";
} ?>Many thanks,
Jason
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘js in header on certain page only’ is closed to new replies.