Author Archive

How to add google adsense to wordpress post

After you have completed your article, you will probably want to add your adsense code.  After selecting the ‘no ads’ button in the HTML editor you will see a code that looks like this “!–NoAds–” with < > surrounding it.  That code is used to turn off the administrators ads so that you may enter your own ads.  If you aren’t sure where to get your adsense for content codes follow these steps.  It’s pretty simple.

  • Log into your google adsense account
  • Select the AdSense Setup tab
  • Select Adsense for Content (please don’t use adsense for search in your post)
  • Select either ad unit or link unit
  • Choose a size you want
  • Select a pallet (default is usually the best, don’t ask me why but for some reason folks like them better)
  • Select continue
  • You don’t have to worry about channels, you can skip this and select continue
  • You can create a unit name to keep in your file but it isn’t really necessary
  • Select submit and get code
  • click in the gray box and the entire code should automatically highlight
  • copy it
  • Paste it in the HTML Editor

To wrap your ad code, copy the code written in red.

<div style=”display:block;float:right;margin: 5px 5px 5px 5px;”> Ad code goes here</div>

Place your ad wherever you think it looks best the same way you would when inserting a photo.  Place the code at the end or beginning of were you would like the ad to appear.  Preview it to make sure it is where you want it before you publish the post.  I don’t believe you should have any problems with this code.  If you want your ad on the left, just change where it says “right” and put in “left” or ‘center’.   And just as a reminder to the users on the Publishers Den, you may not use more than three google ad codes per post.