Log in

View Full Version : Issue adding <script> to WordPress's header.php file?



ckad79
02-04-2009, 05:59 AM
I need some help.

I've used scripts from DynamicDrive on several sites before and find much of it very useful.

I am currently working on site using WordPress (I host the software).

http://www.windowdepotva.com/site

Thing is, I have the add the <script> to my <head> which means I have to add it to my header.php file. BUT when then the script will appear on every page & catagory since header.php contains <head> details for every page. I just don't see the need to have a script on every page.

Is there a photo gallery I want to add and I was wondering if there was some sort of wrap that I can put around the <script> to allow it only to appear on a certain page?

Like I said, I'm just becoming familiar with php files and the likes, so my knowledge isn't huge but I did read about tags like <?php if ( is_page('2')> and I wasn't sure if I was on the right path and if anybody here was familiar with this whole process?

THANKS

Snookerman
02-04-2009, 06:18 AM
You could make an additional header file with the scripts and only use it on the pages you need to have them.