Very dumb question

Discussion in 'HTML & Website Design' started by bowlcutah, Oct 12, 2009.

  1. #1
    I have only worked on wordpress websites in the past, but right now I'm trying to work on a template based website. If I want to add adsense or analytics to every page of the site for example, do I have to add the code to every single individual page or is there any way I can modify the pages all at once? What if I wanted to add as sitewide link, wouldn't trying to add the link to every page be very time consuming if the site was big?
     
    bowlcutah, Oct 12, 2009 IP
  2. 6speed

    6speed Guest

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There are dedicated plugins for this located at

    http://wordpress.org/extend/plugins/

    Another way is to just paste the code generated by Google under a template section (such as footer.php, header.php, sidebar.php, etc)


    So no, you don't have to paste this all the time on each page.

    Goodluck
     
    6speed, Oct 12, 2009 IP
  3. bowlcutah

    bowlcutah Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    My site is template based, not wordpress based. I have only used wordpress in the past and I'm not sure how to mass modify a template based site.

     
    bowlcutah, Oct 12, 2009 IP
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #4
    6speed, he's not using WordPress for his current project. What he needs to look into are conditionals and other programming logic.
     
    Dan Schulz, Oct 12, 2009 IP
  5. 6speed

    6speed Guest

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Sorry, it's too early for me :(
     
    6speed, Oct 12, 2009 IP
  6. Gungz

    Gungz Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can create a master page that contains your header and footer.
    Put the code to display in all pages there.
    That way, you just put the code once, not in all files.
     
    Gungz, Oct 13, 2009 IP
  7. Typo Tat

    Typo Tat Peon

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    What do you mean by "template based"? What are you using to build your site?
     
    Typo Tat, Oct 13, 2009 IP
  8. alexts

    alexts Well-Known Member

    Messages:
    1,126
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    125
    Digital Goods:
    1
    #8
    rename your files from .html to .php
    create footer.php file and put your analytics code there
    insert <? include('footer.php'); ?> into each file
     
    alexts, Oct 13, 2009 IP