Putting Adsense in between the Post in WordPress
WebMasters guide
Many of us beat our head around to know how some sites put Adsense text or image ads in between the content in a post in WordPress. After much research, i finally found a very simple solution to this. Here is what you need to do:
In your WordPress theme, look for a file by the name “functions.php”. Generally it is in the root of your WordPress theme folder. However, it depends on theme to theme. Don’t get confused, just find “functions.php”!
Now put the following code anywhere within your functions.php file:
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');
Note: Make sure that you replace the above Adsense code with your Adsense code, unless you want to put my ads on your site
Now save the functions.php file. There you go! You are all set to put the Adsense ads where you wish within the post in WordPress. You can do that by just inserting the below code in the place where you want your ad to appear:
[adsense]
So whenever you write any post, just think of a best spot within your post to put “[adsense]” and you will have ads in that place!
Hope this small tip helps you make more money!
Short URL: http://startwebsite.org/?p=170








you can easily earn lots of dollars from adsense if you have a high traffic site.