WicketPixie Tutorial: Inserting Adsense Ads To The Right Of Posts

I recently received an email asking how I get the small adsense ad at the right of every post while using the WicketPixie theme. Well, I’ll explain the solution in this post.

First, you’ll want to create a 120×90 ad after logging into Adsense. Now, there will be two pages you should edit: home.php and single.php

You’ll want to find a section of code that says: <div class=”post-comments”>/*blahblahblah*/</div>

Just below that, there should be <!–post-ad–> or something of the type, and then a <div> block. If not, then here’s what you’ll do:

  1. After <div class=”post-comments”>/*whatever*/</div><div class=”clearer”></div>, but before <?php the_content(); ?>, insert the following:
    <!– post-ad –>
    <div id=”post-ad”>
    /* Your Adsense Ad Javascript Code */
    </div>
    <!– /post-ad –>
  2. Do the same to the other page (home.php or single.php, whichever you have not edited) and save.

That should be it. If you have any questions, ask me. My email is eddie [at] eringle [dot] net

One Comment

Hey man thanks so much for this ! All is working except i still have problems with it… its not appering next to the text its appearing abovie it… weird get back to me as soon as you can! Thanks so mucn

Seth

Leave a Comment