1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Make a script load on every page in wordpress?

Discussion in 'Web Design' started by anfyd, Feb 21, 2013.

  1. anfyd

    anfyd Regular Member

    Joined:
    Mar 7, 2012
    Messages:
    330
    Likes Received:
    133
    Location:
    Germany
    Hello BHW,
    I have a certain script that I used to have running on my earlier static HTML page. Now I figured it would be best to switch to wordpress.

    I have to insert the script twice: once after the closing tag and once right before the end of the .

    So my question now is: where do I have to paste this in wordpress to make it load automatically on every page?

    Thanks in advance for your replies.
    Sincerely,
    anfyd
     
  2. xrfanatic

    xrfanatic Jr. VIP Jr. VIP

    Joined:
    Aug 28, 2010
    Messages:
    387
    Likes Received:
    172
    Location:
    http://bit.ly/slb64
    Home Page:
    Is this a php script ?
     
  3. keith

    keith Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    177
    Likes Received:
    127
    Occupation:
    Web Development & SEO
    Location:
    Outside of Chicago
    Home Page:
    Just edit the template IMHO.

    Sent from my DROID2 GLOBAL using Tapatalk 2
     
  4. anfyd

    anfyd Regular Member

    Joined:
    Mar 7, 2012
    Messages:
    330
    Likes Received:
    133
    Location:
    Germany
    No, .js script.
    I want to know where to edit my template? Like on head.php? On the index.php? Where is it enabled on every page?
     
  5. MatthewWoodward

    MatthewWoodward Senior Member

    Joined:
    Aug 31, 2012
    Messages:
    992
    Likes Received:
    1,694
    Occupation:
    SEO
    Location:
    UK
    Home Page:
    Edit header.php and footer.php in the template folder (wp-content/themes/whatever)
     
    • Thanks Thanks x 1
  6. nickcarter

    nickcarter Newbie

    Joined:
    Feb 19, 2013
    Messages:
    15
    Likes Received:
    3
    Put in header.php or footer.php = will load in all page
    single.php = only load on article or blog post
    page.php = only load on your page, eg: about,contact
    index.php = only load on home
    category.php = only load in category page
    tag.php = only load in tag page
    search.php = only load in search result page
     
  7. saber210

    saber210 Supreme Member

    Joined:
    Sep 1, 2011
    Messages:
    1,358
    Likes Received:
    500
    Location:
    -
    Put it on header or footer.