Google Adsense Ad Units

4 replies
  • SEO
  • |
Hi, How to I go about defining the first ad unit in the html code of my website, if I am using a WordPress theme like Thesis? I want to be able to define the ad units number in the order I choose. Please show me how to do this someone.
#adsense #google #units
  • Profile picture of the author JoshuaG
    Sorry you'll have to be more clear.
    Signature

    {{ DiscussionBoard.errors[3214315].message }}
    • Profile picture of the author paulgl
      However your page looks to a human, google will in most cases abide.

      But the point is moot. Just place your ad blocks, load the page, and whichever
      one is furthermost on top, that's the one. I don't know of anywhere that google
      lets you decide which one is the "first," except by ad placement. There is
      no defining the top ad block. You could "define" it, but if google thinks another
      one is on top, well, you would never know.

      If you look at a sample page using whatever theme you have, and it has
      set places for adsense, you would know which one is on top.

      But again, saying an ad is the top one is moot if google does not think so.

      I actually use 2 ad blocks above the fold, right side, left side. Both are
      on equal level. Google probably "decides" the left one is "top." I would
      not know. I do know the bottom block is indeed the bottom.

      If your theme does not have easy adsense placement, then sifting
      through a mass of CSS, DIV's is a bear. It may take a few tries to
      get it right.

      To be certain of a "top" ad, put the ad just below the <body> tag,
      first line, paying attention to the alignment. Center probably works best.
      provided you can locate this exact spot. Since sifting through can be rough,
      Load the page, then view the html source. This is the way it looks to
      your browser. Now locate the <body> tag and see what is there just below
      it. Then you can find that by looking at the pages you edit. It's a good
      way to determine other things too like class of tables, fonts, etc.

      Likewise, to be sure of a bottom ad, put it right before the </body>

      I learned a long time ago to not try and handcode some themes. Just
      pick ones that have set editable places for ad blocks.

      The top ad is not necessarily the first ad in the raw source.

      Peruse themes that have adsense blocks. Choose one that has
      adsense in places you like.

      Paul
      Signature

      If you were disappointed in your results today, lower your standards tomorrow.

      {{ DiscussionBoard.errors[3214463].message }}
  • Profile picture of the author Isaiah
    yes there are several plugins you can get with wordpress that will let you select where the ads go with thesis..I use thesis...I it's a good theme....just do a search in plugins for adsense
    {{ DiscussionBoard.errors[3214651].message }}
  • Profile picture of the author Fraggler
    In Thesis 1.5 you jsut had to define a function for each of your AdSense blocks in the custom_fucntions.php and then insert the function above or below the hook where you want it to appear.

    For Example - this will add an adunit towards the top and bottom of the page:
    <?php

    function customAdsenseTop380() {
    ?>
    <div id="google-380">
    ADSENSE CODE GOES HERE
    </div>
    <?php
    }
    function customAdsenseBottom380() {
    ?>
    <div id="google-380">
    ADSENSE CODE GOES HERE
    </div>
    <?php
    }
    add_action('thesis_hook_before_post_box', 'customAdsenseTop380');
    add_action('thesis_hook_after_post_box', 'customAdsenseBottom380');
    Thesis Hook Reference List -> Thesis Hooks to find the different spots to find where you can place them.
    {{ DiscussionBoard.errors[3215098].message }}

Trending Topics