needing to add code i header for specific page only

Discussion in 'WordPress' started by dnoah, May 17, 2010.

  1. #1
    I am in need of adding some javascript code, only for a specific post, in which I will be adding a onpage calculator for.

    I have the "General Headers" plugin that I use - but I do not want it on every single pages header starting the javascript because of siteload time etc etc

    How can I put it JUST IN the post that I want it to load in?

    Can I add the

    <head>
    all the javascript for the calculator
    </head>

    in the HTML Post info?

    So my question is can pages have to <head> sections and still be good?
     
    dnoah, May 17, 2010 IP
  2. DrVillain

    DrVillain Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    no htmls spec allow 1 head tag.


    you can wrap it with a script tag
    <script type="text/javascript">
    //code goes here
    alert('hello dnoah');
    </script>

    and drop it in the html of your post and it should be good
     
    DrVillain, May 17, 2010 IP
  3. DrVillain

    DrVillain Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    oh a side note, it would be a cool feature to be able to do <head></head> in a html of a post and have it bring it to the head before rendering, thanks for my next plugin idea.
     
    DrVillain, May 17, 2010 IP