I found a easy way to add adsense ads in posts or pages using functions code in functions.php that I found while surfing from this article the code is at bottom you need to add your adsense code where it says Add Adsense Code Here.
You can use a short code to position adsense any where on your post or page as this function will take of positioning your Adsense.
The code that needs to be added to posts and pages is shown below:
it is called in the text with:
[ adsense float = 'left ' ] this can be right or center No Space in [ ] space are added to display the shortcode.
I am Author/Publisher WordPress Coach and Consultant who enjoys writing tutorials and support and help wordpress users build better WordPress website/blog.
Read Testimonials
WP SHE'S VIRAL - Multi LicenseUnique Content locking WP Plugin, with built in Credit based system and Affiliate links to get you guaranteed Viral Traffic to your blogs.
FB Member Lock Developer LicenseThe FB Member Lock plugin will transform the way you look at Lead Generation by turning any and all content you want into Facebook enabled Membership content on your WordPress Blog. Capture leads to your mailing list in 2 Clicks and add new members to yo
WP SHE'S VIRAL - Developer LicenseUnique Content locking WP Plugin, with built in Credit based system and Affiliate links to get you guaranteed Viral Traffic to your blogs.
FB Review EngineTurn every Review on your Blog into a Viral Traffic and SEO Firestorm and build a Buyer List from Confirmed Buyers at the same time! Everyone knows that Reviews and Social Proof are what drive sales these days. Amazon.com is pure proof. Use the power o
Please Leave a Review
Can you please leave Review Select Number of Stars for the review and write review in box and Click on Connect Preferred Button.
Hi Govindji. I have been looking all over the internet but I can’t seem to find how to wrap by google adsense ads in my single.php file. I’m using the wordpress Twenty Eleven theme with coding which are different from all the adsense wrapping tutorial out there. Could you help me out? My full single.php codes are below. Thank you so much man.
The file you looking for is content-single.php you need to add in that file same way I have on the post above yours but you need make change in child theme so copy the file and put in child theme and make change there.
<div class=”entry-content”>
<div style=”float:left; padding-top:20px; padding-left:10px;padding-right:10px;”>
Adsense Code Here </div>
Thank you so much Govindji! You’re a real life saver! I could never have guessed that the correct file was not single.php but rather content-single.php. As a little show of gratitude, I’ve google +1 your article God bless you!
Hello, is there a way to simply put a similar code inside the functions and forget about without messing any other files of the theme. I need something I can simply put in the functions.php and have it shows adsense below posts regardless of pages, articles or custom post.
Thanks for any help on that.
With the method above you can add adsense where ever you want all you need to do add the short code where ever you want in posts or pages and position as well
thanks for turning my article into a video tutorial – it proofs that you don’t need plugins for any minor tasks to customize your wordpress.org powered site.
I don’t seem to have the option “editor” under the category “appearance” on y blog. I am using the template twenty ten by the wordpress team. Is there anyway I can add goodle adsense banners in the right hand column of my blog so the banner is below my categories for example?
I have tried adding it using the widget text but that doesn’t work either….
Since you do not have a editor in Appearance I assume that you are using wordpress.com for your blog and you may not have way to install a plugin either so you will be limited to adding adsense as I have done in this article.
Hi. thanks for the tip. This works. But google adsense technically only allows the adds to repeat 3 times. By using the codes that you suggested, does this mean the ads will appear in all 10 posts assuming the adsense float code is inserted once in 10 posts?
It will only appear where ever you put the short code when you write your post or page like I have done on this site.
I have the put adsense short code in single.php so that it appears float to left on all articles and if I want another one I can put a short code in article when I publish manually.
Download FREE Videos On How To Securely Install Wordpress
Testimonials
I would like to recommend Govindji's services, to that person, who is a do-it yourself-er, like me, but get's stuck on some crappy little issue that blocks you for weeks like happened to me.
First he helped me on the WordPress.org site when no one else would, then, I asked if he could correct some real messy problems for me, which he did for a very reasonable fee, as he said, on a "friends basis."
So, I am a fan of this man and will tell others as well. If you could see the before and after on my site, you would be amazed.
He "gets" the Wordpress community spirit, which so many "big boys" have already lost.
John Pollard Las Vegas
Wow...I saw his email on wordpress..
And I added him aimlessly.
He responded in no time.
And helped me out with my blog problem.
I'm so delighted with his quick intervention. Now my blog is back.
I cant thank him enough because It's not everyday you see a stranger willing to help without asking for anything in return.
Thanks once again and continue to be you.God bless you.
Spicytee Lagos,Nigeria
Thanks very much for your video on changing (moving) a Wordpress site from one host to another. It was very helpful. I have 3 or 4 sites that I want to transfer and I didn't know how to do it. Your video is and will be extremely useful.
Hi Govindji. I have been looking all over the internet but I can’t seem to find how to wrap by google adsense ads in my single.php file. I’m using the wordpress Twenty Eleven theme with coding which are different from all the adsense wrapping tutorial out there. Could you help me out? My full single.php codes are below. Thank you so much man.
<?php previous_post_link( '%link', __( '← Previous’, ‘twentyeleven’ ) ); ?>
<?php next_post_link( '%link', __( 'Next →’, ‘twentyeleven’ ) ); ?>
The file you looking for is content-single.php you need to add in that file same way I have on the post above yours but you need make change in child theme so copy the file and put in child theme and make change there.
Before
Thank you so much Govindji! You’re a real life saver! I could never have guessed that the correct file was not single.php but rather content-single.php. As a little show of gratitude, I’ve google +1 your article
God bless you!
I want to add the code on single.php, could you specify where should I paste the code – under get_header?
I’m using graphene theme by the way.
If you want add directly in single.php you need add the adsense code just after
<div class=”entry-content”>
<div style=”float:left; padding-top:20px; padding-left:10px;padding-right:10px;”>
Adsense Code Here </div>
Before
<?php the_content(); ?>
Hello, is there a way to simply put a similar code inside the functions and forget about without messing any other files of the theme. I need something I can simply put in the functions.php and have it shows adsense below posts regardless of pages, articles or custom post.
Thanks for any help on that.
With the method above you can add adsense where ever you want all you need to do add the short code where ever you want in posts or pages and position as well
thanks for turning my article into a video tutorial – it proofs that you don’t need plugins for any minor tasks to customize your wordpress.org powered site.
You are welcome as soon I read your article i made a video to make easier for newbies
I don’t seem to have the option “editor” under the category “appearance” on y blog. I am using the template twenty ten by the wordpress team. Is there anyway I can add goodle adsense banners in the right hand column of my blog so the banner is below my categories for example?
I have tried adding it using the widget text but that doesn’t work either….
Thanks for your help!
Since you do not have a editor in Appearance I assume that you are using wordpress.com for your blog and you may not have way to install a plugin either so you will be limited to adding adsense as I have done in this article.
Hi. thanks for the tip. This works. But google adsense technically only allows the adds to repeat 3 times. By using the codes that you suggested, does this mean the ads will appear in all 10 posts assuming the adsense float code is inserted once in 10 posts?
It will only appear where ever you put the short code when you write your post or page like I have done on this site.
I have the put adsense short code in single.php so that it appears float to left on all articles and if I want another one I can put a short code in article when I publish manually.
You are welcome anything to help and make your setup easy.