Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I cannot get a Google AdSense ad to show up in a WordPress blog I'm working on. The ads have been approved and I entered the code (and double-checked the code to make sure I had it right). The code is as follows:

<div id="ads_sidebar">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7308560787788569";
/* Makeup */
google_ad_slot = "0956930336";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

The comments (i.e. <!--) were part of the code that Google provided. I tried without those as well and it didn't work. The CSS for the div is as follows:

#ads_sidebar{
position:absolute; top:0; left:-190px; background:transparent; font:normal 12px/14px 
"Trebuchet MS","Lucida Grande","Lucida Sans Unicode",Arial; padding:20px 20px 30px 5px; 
display:inline; float:left; _margin:0 auto; height:600px; width:120px;
}

I know the div shows correctly because I tested the code with a border:1px solid black; and it displayed on the screen.

I also know that sometimes Google Ads don't show up to the owner of the account if you're signed in so I tried from a different browser. Still no luck. Anybody have any ideas why it hasn't shown up? Thanks.

share|improve this question

closed as off topic by Michael, Chris_O, toscho Jul 12 '12 at 0:33

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Where are you putting this code? Do you see any errors on the page? What does the browser console show? Even then, I'm not convinced this is a WP question and it will likely be closed ... –  EAMann Jul 11 '12 at 22:58
    
Yep sorry. It was on a WordPress blog so I was concerned that maybe I was having a problem with the javascript conflicting with something on my page. All I had to do was be patient and let it run it's course. Sorry, didn't mean to clutter up the board! –  MxmastaMills Jul 12 '12 at 2:51

1 Answer 1

up vote 1 down vote accepted

Just make sure to wait at least 30 - 60 minutes after you placed the ads, because it will take some time for the ads to adjust to your website (content wise).

You can already check your website if the code is already there by following these steps:

  1. Go to the page where your ads suppose to be
  2. Check the source code
  3. Look for your Adsense code and / or your publisher number "ca-pub-7308560787788569"

Good Luck

~ LetUsLook

share|improve this answer
    
Yep, that was exactly it. I just needed to be patient. Thanks! –  MxmastaMills Jul 12 '12 at 2:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.