Title: google ads script
Last modified: August 18, 2016

---

# google ads script

 *  Resolved [drew68](https://wordpress.org/support/users/drew68/)
 * (@drew68)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/google-ads-script/)
 * can someone tell me where i need to place my google ads code in my index.php 
   file? the code we got from google is not working and was wondering if someone
   can take a look…at my source code…
 * well here’s the code…
 *  <div class=”post” id=”post-<?php the_ID(); ?>”>
 *  [<img src=”<?php bloginfo(‘template_directory’); ?>/images/top.gif” border=”0″ alt=”TOP” title=”To the top” />](https://wordpress.org/support/topic/google-ads-script/?output_format=md#top)
   </div>
    <small>Posted on <?php the_time(‘F jS, Y’) ?> by <?php the_author() ?
   >. Filed in <?php the_category(‘, ‘) ?>. <br /> </small> <div class=”entry”>
 *  **<p align=”center”>
    <script type=”text/javascript”><!– google_ad_client = “
   pub-4137584417085561”; google_ad_width = 468; google_ad_height = 60; google_ad_format
   = “728x90_as”; google_ad_type = “text_image”; google_ad_channel =””; google_color_border
   = “FFFFFF”; google_color_bg = “FFFFFF”; google_color_link = “0000FF”; google_color_text
   = “000000”; google_color_url = “003366”; //–></script> <script type=”text/javascript”
   src=”[http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt](http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt);
   </script>
 *  <?php the_content(‘Read the remainder of this entry »’); ?>
    </div><!– End of
   post div–>
 * this is not working.
 * could it be the code itself not working? or where i’m placing it?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 9 months ago](https://wordpress.org/support/topic/google-ads-script/#post-425249)
 * Well, you’re trying to place it inside your post, and so it will repeat for every
   post on the page. Since Google’s rules state that you can have a maximum of three
   adblocks per page, the reason it’s probably not working is that you have more
   than 3 posts on the page and so the script, when it runs, is noticing the massive
   number of ads, and not showing anything because you’re violating the terms of
   service.
 * But that’s just my guess, of course.
 *  Thread Starter [drew68](https://wordpress.org/support/users/drew68/)
 * (@drew68)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/google-ads-script/#post-425461)
 * thank you otto…your right and i figured that out just recently…i haven’t been
   on so i apologize for not letting you know sooner!
 * thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘google ads script’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 2 participants
 * Last reply from: [drew68](https://wordpress.org/support/users/drew68/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/google-ads-script/#post-425461)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
