|

Random Rotating Ads & Adsense

Using the Random Rotating Ads Plugin for WordPress has several benefits, some of which were mentioned in an article back in May, however having read about many WordPress themes recently, it appears that many bloggers especially the new comers, are experiencing quite a bit of difficulty in placing Google Adsense on their posts / articles.

Therefore this article is going to go into a little more depth explaining the use of the Random Rotating Ads Plugin (I am assuming you have this plugin already installed). I am not going to deal with placing Adsense in the sidebar of your theme as that is fairly straight forward, what we are going to look at is how to get Adsense ads displaying on your single post pages. So first lets look at a typical code sheet that is responsible for building your page. 


Typical Single Post Code Sheet

Random Rotating Ads & Adsense


Looking at the above code, it easy to see why many newcomers to blogging are left scratching their heads & wondering where the hell do they put this Adsense code. I remember a few years back when I first saw one of these code sheets, my initial reaction was something along the lines of what the ” F “, so I know exactly how some of you are feeling hahaha.

Now I left the numbers from my code editor specifically to be able to point you to the exact line of code we are going to deal with, (these numbers will not show when using the WordPress editor). Ok line 7 refers to “the_title” and is wrapped in a h2 tag, this is the ideal spot to place a nice big 300 x 250 ad-block & is classed by Google as the hottest ad spot on your page.


Ok now follow these simple steps;

1. Get your Adsense code from Google and save it to a notepad as plain txt file.

2. Open your Random Rotating Ads Plugin, it is located in the left sidebar of your WordPress editor under “Tools” & is called “Datafeedr Random Ads”.

3. Create a new Ad Group called “300 x 250 Ad-Block” As shown below;


Random Rotating Ads & Adsense

 

4. Paste your Adsense code into the empty box marked Ad #1. As shown below;

 

Random Rotating Ads & Adsense

 

5. Remember to click save at the bottom of the page or you will have to start from scratch !

6. Select & copy the php code that the Random Rotating Ads Plugin gives you, as shown below;

 

Random Rotating Ads & Adsense

 

7. Paste the highlighted code above into a notepad and save as plain txt, this is simply for ease of access because you cannot access two seperate areas of WordPress at the same time.

8. Repeat steps 4 to 6 for however many Ads you want to rotate in this particular Ad-Block, it will work with 1 or as many as you require, you may also mix ads from different sources as long as you keep the sizes the same.

9. Now back to your single post code sheet, open it in your WordPress theme editor, then place your cursor at the very end of line 7 & press enter to insert a new line.

10. On the new empty line (now number 8), paste in the line of code that you saved from the Random Rotating Ads Plugin.

Note: You may either just paste in the single line of code, or you may also add the div class (lines 9 & 10) which will then give you the ability to use margin, padding & alignment on this ad-block from within your style sheet.

 

Random Rotating Ads & Adsense

 

11. As can be seen above I have added a div class to this ad-block which acts as a label & allows me to identify and apply simple styling to it from within my style sheet, as shown below;



Random Rotating Ads & AdsenseThis small snipit of code in the style sheet will align to the left, put a 10 pixel space top & bottom of the advert & also a 5 pixel padding around the advert, finally a 3 pixel border around the whole advert. Now all this is obviously not necessary it is simply a little extra styling & as mentioned above you can simply insert the single line of code & not bother about any styling.



The Final Result

Random Rotating Ads & Adsense


Now is that not quite simply the dogs gonads..? Random Rotating Ads & Adsense

So my friends by simply following these instructions & of course a little practice you can place various size Adsense adverts virtually anywhere in your blog, irrespective of the theme you are using, this process will work with all themes. The Random Rotating Ads Plugin, helps simplify the whole process & it helps to keep your code as light as possible by reducing everything down to a single line of php code, which is also an obvious speed benefit.

Republished by Blog Post Promoter


Related posts:

  1. Google Adsense Setup & Optimization Tips
  2. Section Targeting Boosts Adsense Earnings
  3. Adsense Earnings Crippled By PC Optimization Software
  4. Add Google Custom Search To Your Blog
Posted by on Nov 11 2011. Filed under Wordpress Plugins. You can follow any responses to this entry through the RSS 2.0. You can leave a response or trackback to this entry

6 Comments for “Random Rotating Ads & Adsense”

  1. Hi Kris,

    Yes it probably would be better if anyone encounters problems with this plugin, they should disable all plugins temporarily & then test Random Rotating Ads again. Many people don’t seem to realise that one plugin can have a terrible effect on another. I’ve used this plugin for around 6 months now & I have to be honest, it does work perfectly, whether you want a single ad or rotating multi ads.

  2. I have been using this plugin for that reason since i first came in contact with it. It works perfectly, is easy and allows you to arrange all your ads on the admin panel.

    The problem that Mark has is probably his adsense code; I had the same problem myself after some plugin scrambled the codes of my theme. The adsense code should be exact the same that Google gave you.

    nice site btw, you gained yourself another subscriber :)

  3. Hi Mark,

    Well the only reason I can think of for Adsense not displaying is possibly that you either have too many ads displayed already..? or Google is unable to find suitable ads and you have the settings set to show white space instead of public service ads!

    A good test to see where the problem lies is to add a large html/txt widget to the top of your sidebar (assuming it will take a 300px x 250px block) and then put your adsense code in that html /text widget.

    If your advert then displays then there is a problem with datafeeder (rando rotating ads), if it doesn’t display then the problem lies with your adsense code..?

  4. I’ve got ads from affiliates rotating just fine, but when I try adsense code, it does not display anything. Sometimes it finds a random image from my page and displays that.

  5. Hi Greg,
    Can you be a little more specific & let me know exactly which bit of styling your talking about..? Maybe then I can help you out ;-)

  6. Im trying to figure out how to implement the styling skill you used for some reason my divs are not letting me put the box to the right. But i have adsense exposed for FREE on my site.

Leave a Reply

*


Advertise Here:

More From This Category

Sponsored Ads

Business WordPress Themes Scribe. SEO Made Simple.
Catalyst Theme - WordPress Accelerated
How smart is your Theme?  How good is your support? Check out ThesisTheme for WordPress.
No Need For WordPress Developers — Drag & Drop With Headway link building
Sell Your Website - WebsiteBroker.com
Guaranteed Top 10 Exposure Across 350+ Search Engines