Do you ever wondered why some blog don’t use adsense becaue they thing the revenue is too low, while some other are very happy with it? The answer to this question is simple : Adsense work with keywords contained within the page. If the page have keywords that pays well, then you’ll make money, otherwise, your Adsense revenue will not be more than a few cents per day.
Are you still using Adsense ads on your blog? Whatever what you answered to the previous question, if you have an Adsense account, then this trick is for you.
How to do it
First, you have to insert the following code to your function.php file. This file can be found on your theme directory (For example: http://www.catswhoblog.com/wp-content/themes/thesis). If it doesn’t exists, just create it.
Don’t forget to change the adsense code, unless you’d like to display my ads on your own site!
function showads() {
return '<script type="text/javascript"><!--
google_ad_client = "pub-3637220125174754";
google_ad_slot = "4668915978";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';
}
add_shortcode('adsense', 'showads');
Once you inserted the code and saved your functions.php file, you’ll be able to embed your adsense code on your posts and display it exactly where you want. To do so, simply paste the following code on the editor, in html mode:
[adsense]
Pros and cons of this method
The obvious good side of this method is that it let you insert your Adsense ads exactly where and when you want it. For example, if you wrote a post about “Making Money Online” you may display some Adsense ads. On the other side, if you wrote a post about WordPress (A keyword that will make you earn just some cents), you shouldn’t display any Adsense.
If you detect that a particular post don’t bring as much as expected, you can remove ads on this post only.
The bad side of this method is that you have to manually insert your ads in each of your posts, and of course, there’s a risk that you forget to do so. Also, if you remove the code from your functions.php file, you’ll have to manually remove the [adsense] codes in your posts.
Also, don’t forget that Adsense terms of services forbids you to use more than 3 ads block per page.
I haven’t started to use this tip on CatsWhoBlog yet, but it gave me good results on some other blogs of mine. Anyways, you have nothing to loose, especially if you decided to drop Adsense from your blog.
Let me know about your questions if any, and your feedback about this method is definitely appreciated!
{ 13 trackbacks }
{ 12 comments… read them below or add one }
hey Jean, that sounds VERY good! You are making me wanting to create my own blog
))
@Pedro : Yes, you definitely should
Interesting, can you pass variables from a shortcode to this? Would be cool to specify what size of ad you were displaying.
@Wes Bos : Yes, you can use attributes with WP shortcode. This can be used to specify ad size, or even a css style. I have this article for you if you want to do how to do it: http://www.wprecipes.com/how-to-use-wordpress-shortcodes-with-attributes
That is really cool! it saves having it put on every page, even when you don’t want it there.
This is a really great tip on the power of shortcodes!
I’m pretty Godley’s Sniplets plugin can be configured to do this automatically, and insert the the shortcode in the post automatically as well. Just haven’t looked at it lately. I kind of like using the shortcodes directly myself.
Glad to read that you are enjoying this tip! I’ll write more articles about WP shortcodes if you want to.
This is a really handy tip – I didn’t know how easy it is to create shortcodes! Thanks very much.
Great tip! A really handy method for adding AdSense ads exactly where you want them.
Thanks for this tip, sure it will be handy for me. I always try to keep the number of plugins to the minimum and this function will do the job for me.
Didn’t know it is that easy to create your own wordpress shortcuts, this might be incredibly useful – thanks!
Thanks for this helpfule article!