because X marks the spot

xMark Blog Theme Site



February 22nd, 2007 at 8:43 pm

Google Adsense - Show one after the first post

» by Lisa in: How To

The xMark theme comes coded with this for you - All you need to do is add your Google Adsense code and you’re done! If you don’t add the code, nothing will show, so - for you WordPress MU users out there, you can still use this theme and the optional adsense code will not affect the template output at all.

To add your code, look in the Main Index template (index.php) and find this code:

<!--ADD YOUR YOUR ADSENSE CODE HERE-->
<!--replace this line with your code-->
<!--END ADSENSE-->

See that line in the middle? This one:

<!--replace this line with your code-->

Remove JUST that line and replace it with your Adsense code. Don’t forget to hit the ‘Update File’ button at the bottom so your changes are made. That’s it - nothing to it, right?

This will display your Google Adsense ad block after ONLY the first post on your front page. Since Google only allows you to have 3 adblocks on the page - this gives you the freedom to add Google Adsense in your sidebars, if you’d like. That you can accomplish by using a Text Widget - no problem!

As an example, this site is using a 336×280 Google Adsense block in this area and it works pretty nice!

11

Pages: [2] 1 » Show All

  • 11

    I just want to say how much I appreciate this website and theme. I have been struggling with adsense for over a week, so I finally visited this site, and how easy you made it. It was simply a matter of removing a couple of brackets that were not mentioned in the code or on the adsense help page. Thank you, thank you, thank you. I can finally get on with my life! LOL

    Jenny on January 23rd, 2008

Pages: [2] 1 » Show All

 

RSS feed for comments on this post | TrackBack URI

Close
E-mail It