How to use Google Adsense in WordPress blog
Have you tried to earn some money on your blogging? Well, a lot of people do try. Some bloggers can earn a lot of money, others not so much. And I’m in the second group. But it doesn’t hurt to try to have some ads on your blog.
This small guide is to help you place Google Adsense ads in your WordPress blog hosted on your own domain. The easiest way is to go to the Appearance menu on the left and select Widgets. Here you add a new widget to the sidebar of the Text-type. Copy the code for the ad that you got in Google Adsense and past it in the new Text-widget. That’s it.
You can use one of the plugins found at WordPress.org. I haven’t tested any of them, so I can’t say how they are.
If you want to have full controll or just want to do it the hard way, then you edit the code your self. There are three temples you should consentrate on (found in Appearance – Editor). The files are archive.php, index.php and single.php.
At the top of each file, you will find a code similar to this:
1. <?php get_header(); ?>
3. <div id=”content” class=”narrowcolumn”>
4. [YOUR CODE HERE]
5. <?php if (have_posts()) : ?>
You place your Google Adsense-code on line 4 (remember that the number shall not be written to the php-file, it’s only for illustrations). This will place the ad at the top of the page. I usually place the add in a p-tag:
<p style=”text-align: center;”>[YOUR CODE HERE]</p>
I do this to center the ad in the blogpost and to give a bit of space around the ad.
You can also add the ad to the bottom of the page. Each of the three mentioned php-files have this code at the bottom:
<?php endif; ?>
[YOUR CODE HERE]
<?php get_sidebar(); ?>
<?php get_footer(); ?>
And you see where you have to place the code. You can also put an ad between the post and the comment. To do this, you have to look for the following code at the bottom of the single.php file:
[YOUR CODE HERE]
<?php comments_template(); ?>
The picture bellow shows you how it will look.
You can offcourse use ads from other associates-programs. remember that you can only use three Google Adsense units/page.
You have to test what placement gives you the best income. Try, test, fail and try again.
If you need more information on Google Adsense, you can take a look at ProBlogger.net. If that’s not enough for you, take a look at Amazon.com. The search for google adsense give you over 600 book titles. Also a relevant keyword in all this is AdWord.
I hope this was helpfull. If you have comments or experience you want to share, please feel free to do so.
I also found a YouTube-video of AdSense optimization where it talks about the placement of ads, well worth a look.
Forslag til innlegg:
Comments are closed.