Adding Javascript ad code from ad network
-
Please help! I have tried everything to add a javascript ad code to my header and side bar and nothing is working. I put the code in the header.php and sidebar.php files and when I go to the site all that shows up in its place is “‘)” I tested the code and it works fine in the preview of the Javascript/HTML widget, but when I save, it doesn’t appear on my website.
http://www.sportsandalatte.comPlease help me!
The ad code [header]
<!– begin 160×600 Top Sports and a Latte –>
<script language=”JavaScript” type=”text/javascript”>
window.dctile = Number(window.dctile) + 1 || 1;
window.dc_ord = Number(window.dc_ord) || Math.floor(Math.random() * 1E10);
if (dctile==1) {var vdcopt = ‘ist’;} else {vdcopt = ”;}
if (17>dctile) document.write(‘<script type=”text/javascript” src=”http://ad.doubleclick.net/adj/yb.sportsandalatte/;chan1=gensports;rating=pg;dcopt=’ + vdcopt + ‘;yb=ad;s1=;s2=;tile=’ + dctile + ‘;sz=160×600;ord=’ + dc_ord + ‘?”><\/script>\n’);
</script>
<!– End ad tag –>
-
Thank you, but I am not a developer and I really don’t understand what I’m supposed to do. I’ve tried to follow those, but I don’t get it.
If any one can tell me where I’m supposed to paste the ad code, that would be great.
With this line,
<script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/pathto/yourscript.js”></script>Am I supposed to replace “yourscript.js” with something from the ad code?
looked at your where are going to add your ad in header as there not much room for ad 160 by 600
I plan to remove most of the stuff on my sidebar.
I have the code for a banner ad in the header, a sky scraper on the sidebar and a box/rectangle for the sidebar.
I just need one to successfully show and I don’t know where to paste the code for the sidebar.
try using the text widget for side bar
I tried that as well and it doesn’t work.
I don’t know if I’m missing something in the code or what.
Ijust put same code you have on my test wordpress using text widget and is working fine check it out
wow, hmmm wonder why it’s not working for me. Perhaps it’s the theme I’m using? Would that be an issue?
Problem Solved, it was my theme 🙁
I really liked the theme I was using… wonder how I could work around this issue.
Thanks everyone
- The topic ‘Adding Javascript ad code from ad network’ is closed to new replies.