Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
How do i put AdSense code into the external style sheet?
Old 01-11-2009, 03:00 PM How do i put AdSense code into the external style sheet?
Skilled Talker

Posts: 53
Trades: 0
Hey guys, I'm building my first purely hand coded HTML + CSS website. I was wondering if it is possible to somehow insert my AdSense code into the external css style sheet? I basically dont want to have to manually add/remove my AdSense ads from every page when the time arises. So I thought it would be nice if I can edit the AdSense code once and the changes will result on all pages across the website.

I have been looking for this answeronline for a very long time now and cant seem to find the right solution. Thank you.
worldy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-11-2009, 03:30 PM Re: How do i put AdSense code into the external style sheet?
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
If your host supports PHP, simply put <?php include('adsensefilehere'); ?> on each page, where you want the AdSense.
Then when you edit the file adsensefilehere it will change on all pages.
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 01-11-2009, 04:22 PM Re: How do i put AdSense code into the external style sheet?
Defies a Status

Posts: 1,605
Trades: 0
As Insnsus said PHP is the way to do it. Just create a file names ads.php put hte code in there and then include that file where ever you want the ads to appear.

To remove the ads you remove all text from the ads.php file leaving a blank file which is then included into your pages. If you don't have the blank file you will get error message.

I alway use "ads.php" not the single quotes he typed. Maybe both work.
__________________
Colbyt

Please login or register to view this content. Registration is FREE

Last edited by colbyt; 01-11-2009 at 05:37 PM.. Reason: 2 typos ~ i am getting worse not better!
colbyt is offline
Reply With Quote
View Public Profile
 
Old 01-11-2009, 05:12 PM Re: How do i put AdSense code into the external style sheet?
AD7863's Avatar
Major Geek

Posts: 435
Name: Artful Dodger
Location: England, UK
Trades: 0
Yep thats how I do it.
__________________

Please login or register to view this content. Registration is FREE
AD7863 is offline
Reply With Quote
View Public Profile Visit AD7863's homepage!
 
Old 01-11-2009, 05:37 PM Re: How do i put AdSense code into the external style sheet?
Skilled Talker

Posts: 53
Trades: 0
thanks guy, appreciate it
worldy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do i put AdSense code into the external style sheet?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15599 seconds with 12 queries