Results 1 to 2 of 2

Thread: Issue adding <script> to WordPress's header.php file?

  1. #1
    Join Date
    Feb 2009
    Richmond, VA
    Thanked 0 Times in 0 Posts

    Default Issue adding <script> to WordPress's header.php file?

    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).

    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?


  2. #2
    Join Date
    Oct 2008
    Thanked 319 Times in 318 Posts
    Blog Entries


    You could make an additional header file with the scripts and only use it on the pages you need to have them.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts