How to Manually Insert AdSense ads Inside WordPress Posts?
A long time ago, when I first entered into the blogging world with a serious motivation of doing business, I was thinking how to place adsense ads inside wordpress posts. I knew there are a number of plugins available out there. I used some of them but unfortunately I didn’t find them that much useful. I wanted a plugin which will let me put ads inside wordpress posts.
I have a habit of telling people whatever I learn in blogging world. And that’s why I wrote a post featuring the easiest way to put adsense inside wordpress posts using plugin. The plugin was really useful and still I am using this.
But recently I noticed a lot of people are concerned about using third-party plugin to put adsense inside wordpress posts. Maybe they are worried about their adsense account. Well, putting adsense ads inside wordpress post manually isn’t that difficult. There was a time when I was afraid of coding. Still I don’t know coding; but inserting ads inside post using wordpress theme editor is truly simple. It’s like: You copy the code of adsense unit from your adsese account, and place it in the proper place of the theme. That’s it!
So Let me Tell You How to Do that
Go to your WordPress theme editor under Appearance menu.
Make sure you’re editing the theme currently being used in your blog. For example, if you’re using “WordPress default” theme, you’ll see it selected in a drop-down menu at the upper-right corner of the screen.
Choose the File
A theme consists of numerous files. You will see the list of files at the right side. Click on the file that is named as “Single Post (single.php)“.
The source code of that file will be shown in the screen.
Pasting the Code
At the Top of the Post:
Find out the following line in the code (Use Firefox Find option for faster search. Ctrl +F):
<div class="entry">
You need to paste the adsense-given [or any other ads'] code directly right above this line. This will place the ad unit right after the title of your blog post.
At the End of the Post:
Alternatively, or along with the top one, you can also place adsense or other ads right below the post (where the content ends). For this, find out the following line in the source code (in the file single.php) and paste the necessary codes right above the following line:
<?php comments_template(); ?>
This will make your ad unit appear at the end of the post. Please note: If you are using “Related Post” plugin, the unit may appear below that. In that case, you are suggested to take advantage of the old plugin “All in one Adsense and YPN“.
Two Mentionable Things
1. Be careful; this might harm your blog: If any thing, no matter how silly that maybe, goes wrong, your template may become faulty. So, before you apply this manually-adsense-insertion method, make sure you’re trying it on a useless blog. I suggest you have another wordpress blog hosted on any free hosting so that you can experiment anything on that blog. If anything goes wrong, no valuable information will be missed [as nothing valuable exists there].
2. Not only Adsense ads: Bidvertiser, Adbright, etc lots of other Pay-Per-Click ad serving companies are available out there. This way you can place ad unit from any company. It isn’t limited to adsense only.
Share the knowledge
If you agree with me that this is a helpful post,
then do not forget to be kind enough to promote it on social medias and share it with your friends and colleagues and neighbor bloggers. Just hover your cursor upon the Share button and you will find options to share it right with a click. Also, retweet the post to share the knowledge among others.
Have your say
Are you showing adsense [or relevant] ads in your wordpress blog? Did you manually place them or using plugin? Which one you think useful? Do you agree it’s not safe to use third-party plugins for inserting adsense ads? Share your mind with me and my readers.
Did you find this article useful? Did this help you anyway? Is it worth rewarding me for it? Please support me to keep this work up.










