Adsense inline with WordPress blog posts
I was reading this book about optimizing Google’s Adsense (What Google Never Told You About Making Money with AdSense!). In it, Joel Comm describes how he went from $900/month in Adsense revenue to $15,000+/month! Oh, man! It was too juicy to pass up! One of the many things he talks about is integrating your ads into your site. You’ll have to read the book for all the details, but this plug-in should help.
So, I knew I wanted to put Adsense ad blocks in the middle of WordPress posts. I knew I could do it with some simple hacks to WP, but I thought it should be a plugin. It turned out to be remarkably easy to do, and it turned into my first WP plugin. Of course, I “sampled” lots of code from pioneers who went before me.
Adsense — in case you don’t know, is Google’s little advertising engine for non-Google sites. You know when you see Google ads on a site somewhere, and it says “Ads by Gooooogle” or somesuch? That’s it.
Google has some rules about how you place Adsense code on your site, though, and how many Adsense blocks can appear on a page (two?). I haven’t tried to accomodate these rules in this plugin yet. I probably will have to do that down the road. Caveat emptor.
The plugin [download] is pretty straightforward. Put it in your wp-content/plugins directory, then go to your Plugins configuration page and click Activate.
You’ll need to customize the Adsense code in the plugin itself. Look in the adsense.php file. In the first function there’s a block that says “Begin Google Adsense code”. You want to replace the lines between that line and the one that says “End Google Adsense code” with your actual adsense code provided to you by Google. Otherwise, you’ll be showing ads for me.
Once you activate the plugin, you should notice a new button on your Quicktags toolbar. The new button is “Adsense”, and it works like “more”. Click it to insert the Adsense tag, and enjoy the newfound wealth.
Here’s an example:
[Edit: sometimes I see the ads, and sometimes I don’t. It’s just Google’s peskiness. You can view the source and see the ad code is there.]
Because of Google’s policy on multiple ad blocks per page, I recommend that you always place a “more” tag before the “adsense” tag. This way, users will only see the ad if they click the blog entry to see the full thing. Otherwise, you may have several uncontrolled entries on a page all showing the ads. And Google may frown mightily upon you.
January 28th, 2005 at 8:33 pm
Cool - thanks for writing this plugin, much appreciated. I haven’t tested it yet, but will let you know how it goes
January 31st, 2005 at 2:07 pm
The limit is three Adsense blocks per page. It’s in the Program Policies.
February 2nd, 2005 at 11:17 am
Good work! I just installed it on my site and its working. Thanks a lot…
February 4th, 2005 at 3:10 pm
Phil, I was wondering if your plugin is open source. I would like to know before I edit it for another purpose. Please email me with permission if that is necessary.
February 8th, 2005 at 12:18 am
Many thanks! Very useful plugin! Works perfectly at www.macalua.com
February 12th, 2005 at 8:15 pm
Great little tool, worked like a charm!, Thanks!
Is it possible to create a plugin like this for an RSS feed? I’ve been trying to find a way to make by RSS feed blend in with the page better.
February 14th, 2005 at 8:08 pm
Great plugin! I am using it on both of my sites: TiVoBlog & RaianoFamily.
Thanks!
February 17th, 2005 at 5:05 am
Hi! Thanks for this Plugin. Implemented it fine. But just one Question. Do I have to generate Adsense code with FRAME option enabled or without it.
When I enable FRAME option & generate Code I can see ADs related to Blogs only.
But, when I disable FRAME option while generating, I see only Public Service ADs & only sometimes an AD related to Blogs.
Anyone can help me out? Please.
My email darshanjog.jog@gmail.com
February 24th, 2005 at 1:41 pm
Is there a way to display the ads. on every content page? I tried putting the tag in the default theme index.php but that didn’t seem to do anything.
Thanks …
February 25th, 2005 at 10:02 am
Thakns very much for the adsense plugin, but when used with another custom quicktag with a form script it doesnt work, even when it’s not on the same page. Any ideas how to solve it?
February 26th, 2005 at 11:11 am
Hi
I have used the code sucessfully on one site www.abistudios.co.uk but seem unable to get it to work on any other sites.
Can you help?
Rich
March 8th, 2005 at 1:05 pm
Dave and Richard(s)… Sorry I’ve been out. Did you get your problems resolved with this plugin?
March 11th, 2005 at 6:48 pm
Hi,
Thanks for the plugin. Was easy to install but got one problem with it. If I press the Adsense button nothing happens at all, so I have to manually insert where I like the ad to appear.
Any suggestion on how I can get the button problem solved?
March 16th, 2005 at 6:55 pm
Nice job! Was wondering if you could adapt this to use non google, (as in my own customers) ads? I have three companies that might support my blog if I could run their ads. What do you think?
cheers
Frank
March 16th, 2005 at 9:48 pm
Hi….. I have a problem. I’ve installed this plugin probably a dozen times and even though I can see the ads in my posts I am getting this in the header of my dashboard.
Warning: Cannot modify header information - headers already sent by (output started at /home/twotails/public_html/random/wp-content/plugins/adsense.php:114) in /home/twotails/public_html/random/wp-admin/admin.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /home/twotails/public_html/random/wp-content/plugins/adsense.php:114) in /home/twotails/public_html/random/wp-admin/admin.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at /home/twotails/public_html/random/wp-content/plugins/adsense.php:114) in /home/twotails/public_html/random/wp-admin/admin.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /home/twotails/public_html/random/wp-content/plugins/adsense.php:114) in /home/twotails/public_html/random/wp-admin/admin.php on line 9
No matter how I edit the plugin, I get that. If I leave the and what you wrote in between, it’s fine. What am I doing wrong?
March 18th, 2005 at 9:38 am
Check to make sure there aren’t any blank lines at the top or bottom of the plugin php file.
March 20th, 2005 at 4:39 am
hey,
This plugin didnt work for me in 1.5, i can see adsense button and it does not intsert adsense,any suggestion(s)?
Thanks for nice plugins by the way.
SG
March 20th, 2005 at 10:19 pm
Tried to reinstall the plugin several times, checked for blank lines and more … but it still doesn’t work 100%.
My problems are:
1. I can see the Adsense button in my admin area but nothing happen when I press it. So I have to add the manually in each post.
When I add a ad, I get a blank line above it but /not/ below it, it can be seen if you click on any post on www.seansite.net. Tried to add a , but doesn’t help.
All help is appreciated!
March 21st, 2005 at 12:09 am
Hi There;
A couple of edits on my part:
1) I change the $tag value:
$tag = “”;
This made life easier as without the it was making my XHTML invalid.
2) I increased the logic so that I would only see the ad on the individual post pages, except for the first post on the home page:
/**************************************************************************
** All done! No more changes need to be made below this line! Enjoy! **
**************************************************************************/
if( is_single() )
{
return str_replace( $tag, $adsense_code, $data );
}
elseif ( is_home )
{
if ( get_option(’firstPost’) )
{
update_option(’firstPost’, FALSE);
return str_replace( $tag, $adsense_code, $data );
}
else
{
return str_replace( $tag, ‘’, $data );
}
}
else
{
return str_replace( $tag, ‘’, $data );
}
All I had to do was add update_option(’firstPost’, TRUE); to the home page before the post loop began. Now I get an inline ad for the firt post but not the rest, so that it along with my sidebar ad total two ads no matter now many posts on the homepage.
March 21st, 2005 at 12:05 pm
Shob: Does the [!–adsense–] tag get added when you click the button? And then the adsense doesn’t appear on your page? Or does the tag not even get added?
March 21st, 2005 at 12:13 pm
If the Adsense button doesn’t appear:
The adsense button is added to the edit page with a Javascript function. You may have javascript disabled or you might have an overzealous popup blocker that’s blocking it. (But if javascript is disabled, none of the other buttons would appear…)
Add this code to your wp-admin/quicktags.js file in the same area where you find the other edButtons entries (around line 24):
Sorry I haven’t been keeping up with the comments on the blog. I’ve discovered comment notification was broken in 1.5(!!) but I fixed it now.
March 21st, 2005 at 9:04 pm
Thanks for the answer phord. I belive I got the same problem as Shob. I do see the adsense button, but when I press it the [!–adsense–] tag isn’t added to the post and therefor the adsense adv doesn’t appear on the page.
So what I have to do is manually add [!–adsense–] to the post before I post it, and then the adsense adv. appear on the page.
- So, the Button appear in the admin area but nothing happen when I press it.
A second problem I got is that I get a blank line above the adsense adv on the page, but there are no blank line below, as can be seen here: http://www.seansite.net/thailand/bangkok/bangkok-downtown/
Tries to add a to the script but to no avail. Got an idea how I can get that corrected?
Thanks for a nice blugin btw
March 21st, 2005 at 10:08 pm
Hillyer:
I had to make further changes to your code to get it working on my server.
/**************************************************************************
** All done! No more changes need to be made below this line! Enjoy! **
**************************************************************************/
if( is_single() )
{
return str_replace( $tag, $adsense_code, $data );
}
elseif ( is_home() )
{
if ( get_option(”firstPost”) )
{
update_option(”firstPost”, FALSE);
return str_replace( $tag, $adsense_code, $data );
}
else
{
return str_replace( $tag, “”, $data );
}
}
else
{
return str_replace( $tag, $adsense_code, $data );
}
//return str_replace( $tag, $adsense_code, $data );
}
copied “update_option(’firstPost’, TRUE);” to the index.php file:
./wp-content/themes//index.php
after the first div
March 21st, 2005 at 10:09 pm
oops….
copied “update_option(”firstPost”, TRUE);” to the index.php file:
./wp-content/themes//index.php
after the first div
March 22nd, 2005 at 12:28 pm
Sean: To add a blank line below the ad, you should be able to simply add it in the edit field in your comment. Or add a [p /] (with angle brackets) into your post instead. Or a [br]. Did you try these?
The reason there’s a blank line before the ad is that WP puts text inside paragraph tags. And the default behavior of a paragraph tag [p] is to insert a linsepace after a paragraph, but not before. If you put your adsense ad inside a paragraph tag, the blank space should appear, I think.
March 23rd, 2005 at 12:05 am
Wow! this is fantasitc plug-in… was really needed. Working great in my blog!
Thank you very much.
March 24th, 2005 at 12:34 am
any plan to write a adsense plugin that support MULTIPLE ad format?
March 24th, 2005 at 8:46 am
Re: multiple ad formats
Yeah — but I’m not sure how to do it. Should I have mutliple Adsense buttons on the quicktags bar? Or should I have one and have a popup to let you choose which ad to insert? Or let you edit the tag manually?
I’m going to use the new 1.5 features to add an option dialog to configure the plugin, too.
March 27th, 2005 at 10:38 am
Hi Phord,
I have no technical knowledge. But here is the few suggestion-
All the multiple ad code should be inserted into adsense.php file. For each ad format different “adcode’ should be given… like, etc
Whenever we post a new message we can select particular adcode and insert it into our message.
Thanks
April 5th, 2005 at 9:28 pm
I got the plugin installed fine but the ads do not appear. If you view the source on my page you can see the adsense code, but there are also plenty of and tags as well. you can view this by going to my site at krynsky.com I’m a newb to WP and can’t figure out the problem. I’m running WP 1.5. Any help would be appreciated.
April 9th, 2005 at 7:07 pm
Hiya,
Nice adsense plugin…any idea how to get it working with Adsense Gold tracking url, in the directions it says to ad after the AdSense script but i get a parsing error in the plugin when doing that ?
April 10th, 2005 at 6:57 pm
hello!!
great idea for the plugin but should it work for WP1.5?
cant get it to wrok on http://www.top-10-list.com/
any ideas?
greeetings !
April 18th, 2005 at 2:55 pm
Hi Phord
This is great - works fine on my site. Thanks.
Quick question: where is the plugin inserting the code? I’d like to modify it (with a div?) so that the page content wraps around the adsense. I’m new to PHP, so am slow at figuring this out!
April 18th, 2005 at 3:13 pm
If you put the DIVs around your adsense code in the script, it should work “as expected”. The HTML you insert there goes straight into your post.
April 22nd, 2005 at 8:46 pm
doesnt work for me. how do i activate the plugin in the frontend? no ads are shown. Should I invoke a function or something?
April 22nd, 2005 at 8:51 pm
in my case.. no button is shown, the same with de adsense tag.
April 24th, 2005 at 10:54 am
Hi Phord,
thnx for sharing the wealth
April 24th, 2005 at 1:57 pm
Got the button to show. But when I click it, it only reveals the code itself on the blog. So, what you see is the actual code for adsense not the ad showing up???
Any ideas?
Thanks, Jack
April 25th, 2005 at 12:32 pm
It installs fine, inserts fine, but no ads. I seems to have tried everything but cannot get this to work. Any help?
April 26th, 2005 at 1:23 pm
Jeff: The error you’re seeing may be because the code you’re adding has single-quotes in it. The plugin uses those to mark off the code, so you need to quote them or change them. I can try to help if you email me the code you’re trying.
April 26th, 2005 at 1:28 pm
Jack: That’s pretty strange. Can you point me to an example of this happening?
Particle: Do you get the “Adsense” button on your quicktags bar? If you click it, does it add the Adsense tag into your post?
May 2nd, 2005 at 9:53 am
I don’t see an email address so here is the code
May 2nd, 2005 at 10:12 am
The code didn’t show up in your post. Email me at phil-at-phord-dot-com
May 3rd, 2005 at 8:23 am
ug.
sending
May 13th, 2005 at 9:18 am
In the index.php template (wp-content/themes/default/) put your AdSense code between the second and third tags. Your AdSense block will stay on top of every post:
==========index.php================
================================
May 16th, 2005 at 11:33 am
Great work…fantastic plugin..You are a genius man!! I liked your plugin very much ..just what I wanted..
May 24th, 2005 at 9:37 am
Most excellent! Just what I have been looking for…..insalled with no problems.
Thanks phord!
May 25th, 2005 at 11:05 am
Phord,
Simply awesome I say. . .Simply awesome!
I was always trying to add adsense to my posts but to no avail!
The plugin worked the first time out.
Thank you for your brilliance.
May 29th, 2005 at 10:11 pm
Great, I use it and it works fantastic. Thank you. I have summarised the steps I took to install this plugin here, as well as how I added search and other ads in the sidebar also.
Now any clues on how to remove the two question marks? ??
Thanks Max
May 30th, 2005 at 2:39 am
Adding google adsense to wordpress
Google adsense is making good use of the long tail. It’s now so easy (and free) to put advertisements onto your pages. Starting a blog and being interested in these sorts of things I decided to trial the service.
After enrolling, confirming and…
June 1st, 2005 at 1:12 am
Just what I need! Many thanks for your efforts and generosity!
June 1st, 2005 at 3:06 pm
awesome plugin love it. check it out in use at www.dankster.org
June 4th, 2005 at 3:24 am
What a great plugin! Works excellent!
For those who are having problems with the Adsense button above the post form (Adsense code not being inserted automatically): you might want to check if you have the WP-ContactForm plugin installed. The javascript for inserting the contact form tag, broke all my other plugin buttons.
A simple workaround: uncheck the “Show ‘Contact Form’ Quicktag” checkbox on the contact form options page.
June 8th, 2005 at 2:12 am
Johan,
That bug fix was so easy, it’s not even funny. Can’t believe that’s all it is, just unchecking that box.
The next step would be to somehow figure out a way to REMOVE the adsense code once you get to three on a page, so you don’t go over Google’s rules, forgetting that you have code in an older post. I don’t know how that can be done, but I’m sure somone will figure it out.
Everyone’s problem was that you had to cut and paste the code in a new post, because of the bug…now, I’m sure people will be looking for ways to delete code in old posts without having to actually go into the post and remove it themselves.
Tony Z.
June 8th, 2005 at 10:32 am
Thank you, Johan. Unchecking the ContactForm Quicktag finally made the plugin work. Now it’s rockin’
June 10th, 2005 at 7:49 pm
Kaizening the Adsense Plugin for WordPress
» Adsense inline with WordPress blog posts — from the mind of Phord : …Because of Google’s policy on multiple ad blocks per page, I recommend that you always place a “more” tag before the “adsense” tag. This way, users will only…
June 12th, 2005 at 7:27 am
You rock! Excellent plugin, just what I’ve been looking for!!
June 14th, 2005 at 12:53 pm
The plugin is working thanks to your genius!
June 18th, 2005 at 1:10 pm
I added this little tidbit of code to get the adsense block to float inline properly.
Check it out in use at MaxPower. Nice work making this into a plugin! Really usefull, would be very easy to modify the quick tag and plugin to allow for different style ads (I think).
Cheers
[edit: Fixed HTML markup to show up in the comment. You can find the author’s writeup of his changes here:
Adsense for Wordpress — phord ]
June 24th, 2005 at 2:59 am
[…] que he encontrado es uno que ya estoy utilizando, se trata de Adsense inline, un plugin de Philhord que funciona bastante bien, aunque se podrían hacer algunas mej […]
June 24th, 2005 at 4:49 am
hi
thanks a lot..
its working great..perfectly..
plugin is perfect….
thanks a lot..
thanks
shashi
June 30th, 2005 at 12:22 am
I installed the plugin, activated it & see the adsense quicktag in the ‘Write’ toolbar. But when I type in text into the post box & then click “adsense” nothing happens. What is it supposed to do? I expected that it would insert my adsense code (which I did add to the plugin file). Am I wrong?
June 30th, 2005 at 12:37 am
Johan is a genius. I too unchecked the Contact Forum box & adsense is now working. But unlike you, Johan, the Contact Form button had no effect on any of my other quicktag functions.
Phord, might I suggest that you add this info to the file installation instructions. By my acct. at least 5-6 people in this thread had the exact same problema as I & if we had the problem then countless more who’ve tried to install the plugin have had the same problem.
It’d save us all time & effort if we knew what the problem was right from the start instead of having to search through the forum & then come here to find the answer.
July 3rd, 2005 at 1:15 pm
I can’t subscribe to your blog. When I copy the link my aggregator, it say it’s not a valid URL.
July 4th, 2005 at 5:59 am
Great plugin but it doesnt work with the WP Contact form. When you deactivate the WP Contact form plugin the adsense plugin works.
I could see the button but nothing happened when I clicked on it.
I need to use the WP contact form so I’ll have to deactivate the adsense plugin unless anyone has a solution?
July 4th, 2005 at 6:13 am
Sorry unticking the box in the WP contact form didn’t work for me neither.
July 4th, 2005 at 11:52 am
If the Adsense button doesn’t work for you, you can emulate it easily. It doesn’t insert your adsense code into the ad. Instead, it puts in a comment tag like this: <!–adsense–> (for those of you new to HTML, that’s a LESS-THAN, EXCLAMATION, DASH, DASH, adsense, DASH, DASH, GREATER-THAN.)
If you just type that into your post, you should see the same effect.
I’m sorry the quicktag button isn’t working for everyone. I’ll try to get something that will work universally in place soon.
July 8th, 2005 at 4:08 pm
any ideas what plugins might mess up the adsense code?
somehow I end up with all these lovely (not requested) br’s in my code
I’ve turned off all textile-markdown-plugins, but the freeby br’s are still added (which in all my other posts I don’t mind)
any ideas?
July 9th, 2005 at 3:50 pm
[…] sense in WordPress I found some awesome WordPress plugins. It’s very easy to use! http://www.philhord.com/phord/adsense-inline-with-wordpress-blog-posts/ This entry was posted on Sunday, July […]
July 10th, 2005 at 4:54 pm
Phord, an update..
There appears to be a clash with the plugin intouch. When I deactivate the intouch plugin I am able to use the quicktag button. I think it also helps unticking the quicktage box on the WP contact form plugin options.
Once you have clicked on the quicktag button, you can then reactive these plugins, until you need to add another adsense ad.
Hope this helps a few people out.
July 18th, 2005 at 12:26 pm
Nice work!
July 21st, 2005 at 2:42 am
First of all, I am very new to php/blogging. I set up a wordpress blog on insurance and tried to use adsense. I came across the adsense plugin and gave it a try.
It worked well … but I wanted something slightly different. I found editing index.php, single.php and archive.php gave me exactly what I want:
1. Dispaly ads between posts (not as part of posts) both on the main blog, archives and categories.
2. If a particular entry is clicked, the ad should be shown at the end.
I thought this would be kinda popular requirement but could not find any ready solution. This is what I did (not very elegant but works and please do remember that in the php world I am 1 week old):
This will display ads after the 1st, 4th and 7th post.
July 22nd, 2005 at 2:41 pm
Hi, I’ve got a slightly strange problem on my blog, I’m using the default kubrick template with the latest version or Wordpress, when I insert the adsense tag into my posts it displays fine, however, the adsense adverts that were in my sidebar vanish! The ads under my posts only comprise of two ads, where’as the ads in the sidebar are a block of 5. Is there a way to keep both?
Thanks for your help, hope you can help.
[TW]
July 22nd, 2005 at 2:46 pm
One other thing, sorry bout this…. if I post the adsense code to more than one post, it only displays on the first post in my blog. Stranger and Stranger….
July 22nd, 2005 at 3:53 pm
Tiverton: I looked at your site. The Google Adsense code is getting inserted into your pages, but I don’t know why the Adsense blocks are not appearing onscreen. There must be some Google explanation for it. I’ll try to experiment a bit and see what it takes to get multiple Google ad blocks onscreen.
July 23rd, 2005 at 3:35 am
Thanks, always appreciated. [TW]
July 23rd, 2005 at 8:13 am
[…] d investigate further. The original adsense plugin for wordpress isn’t full […]
July 23rd, 2005 at 8:14 pm
Ok…. I am feeling very very stupid. I have downloaded the adsense.php plugin. I have put it in my wp-content/plugins directory.
However, when I go to my blog and try to activate the plugin, its not even shown as an option.
Does anyone know what I am doing wrong?
Please help! Thanks so much.
July 27th, 2005 at 10:45 pm
Phil, don’t want to take anything away from your adsense plugin, but finding your plugin inspired me to take the concept further in the direction of what I was looking for in this type of add-on.
Working from your idea and your code, I put together and have been using for a few months now, my AdSense-Deluxe plugin. It has a lot of cool features including definining multiple adsense blocks which can be referenced from posts by name.
More info is available at: http://www.acmetech.com/blog/adsense-deluxe/
July 29th, 2005 at 9:09 am
Hi,
your plugin causes RSS not to work anymore. Could you please let me know how I could fix that.
Thank you,
Steve
http://www.GeekTavern.com
July 30th, 2005 at 6:50 pm
Ok, i edited the adsense.php file with my info. i uploaded it to the plugins directory, i see the button and it inserts the adsense tag in my post. However, no tags show up.
http://www.randomofferings.com
August 2nd, 2005 at 4:04 am
Thank you!
works like a charm.
August 5th, 2005 at 6:39 pm
this plug-in works great!
August 9th, 2005 at 10:07 pm
Nice work! Thanks for sharing the wealth.
August 12th, 2005 at 7:55 am
All fixed now, google have updated the way in which ads are served to pages, so I can now display both horizontal and vertical ads with no conflicts whatsoever, thanks for a great plug-in!
August 23rd, 2005 at 9:31 am
[…] mph movie trailer available Ad in line of the posts Just followed other’s idea trying to boost my Adsense income, which is still a sh […]
August 23rd, 2005 at 11:11 pm
Greetings,
I have been using Adsense on my blog and I think it is fantastic. Last night I updated WordPress to 1.5.3, and something broke. Where Adsense would only display one set of ads per page it now displays several. My first guess is that one of the security fixes in 1.5.3 broke the way you were setting the counter/flag that was used to control how many times Adsense displayed an ad. Have you seen this problem yet?
-Chris
August 26th, 2005 at 6:05 pm
[…] « Google Well… I added the adsense plugin from here and I hope it starts working. This entry w […]
August 26th, 2005 at 10:12 pm
[…] pposed to work on my WordPress software here at the www.acmetech.com/blog/ and here at the www.philhord.com/blog . Tomorrow, I’ll be trying out these Plug Ins […]
September 11th, 2005 at 1:12 pm
Plugin “WP-Amazon” blockiert(e) andere Plugins
Das WP-Amazon-Plugin funktioniert zwar eigentlich ganz gut, blockierte bei mir jedoch einige andere Interface-Plugins. Eines der Opfer war das Adsense-Plugin, das wie das WP-Amazon einen Button zu der Quicktags-Leiste hinzufügt. Auch das superpra…
September 16th, 2005 at 3:52 pm
I added the plugin to wp but adsense only shows on a few of my posts.
Adsense won’t show on the main blog page (index.php), only if I go read more it will show ads for some posts.
http://www.sherpatrek.com/weblog/
Any suggestions?
Thanks.
September 18th, 2005 at 6:27 am
http://www.fajarweb has test it and work. klik http://www.fajarweb.com to review
September 21st, 2005 at 6:12 am
I have tried to follow this thread. I am very new at this. I do see the ad but I have errors on the dashboard
Warning: Cannot modify header information - headers already sent by (output started at /home2/lelliott/public_html/blog/wp-content/plugins/adsense.php:111) in /home2/lelliott/public_html/blog/wp-admin/admin.php on line 10
many other lines as well. Any help would be appreciated
October 18th, 2005 at 6:09 pm
awesome plugin
October 24th, 2005 at 10:04 pm
working fine here thank alot
http://www.petinsurancesupply.com
October 25th, 2005 at 3:18 am
Thanks! Worked fine here: http://www.medicineassociation.com/
No problems at all! Very good info here.
October 28th, 2005 at 5:20 am
Thanks a ton, Phil! I tried Moosecandy, but it broke my RSS feed, so I had to dump it. In 10 seconds, your code was running flawlessly on my site. Drop by some time! http://blog.gadgetgurutech.com
October 29th, 2005 at 10:22 pm
Thanks, i was looking for this plugin to blend my google ads. and by the way, your blog footer looks kinda weird????fix it
November 3rd, 2005 at 2:36 am
Thanks for making this; been looking for something like it.
November 22nd, 2005 at 11:51 pm
We customized your plugin to show adsense on single posts only between paragraphs and it works great. Good Job.
November 30th, 2005 at 4:55 am
Hi, many thanks for your plugin. It works fine!
December 1st, 2005 at 6:46 pm
Very interesting (and useful tool) ! We have added it to our directory of Adsense tools.
If only the Adsense integration at Blogger could be as elegant as this one…
December 9th, 2005 at 1:39 pm
We japanese like adsense,too.
But not understading the word”adsense”.
because Japanese speaks japanese english.
December 17th, 2005 at 6:10 pm
Nice.
But I have only first ad. Adds in 2nd and further posts are invisible
December 19th, 2005 at 6:18 am
[…] laquo; Adsense in Wordpress Wordpress and Adsense inline Author: PhilHord Download the plugin >> Download here How this plugin works ? Pu […]
December 23rd, 2005 at 2:22 am
Thanks for the plugin- works perfectly and my websites are all the better for it. Good work
December 28th, 2005 at 2:08 pm
Thanks for the plugin.
December 28th, 2005 at 2:14 pm
Hi, many thanks for your plugin.
December 30th, 2005 at 11:02 am
[…] load) Werbung/Affiliate/Geld verdienen-Plugins Adsense Deluxe (Artikel) (Seite) Amazon Media Manager (Artikel) (Seite) Technorati […]
December 30th, 2005 at 2:15 pm
Works perfectly! Thanks a ton!
January 1st, 2006 at 2:58 am
Thanks, it works on http://wwwblog.be
January 1st, 2006 at 8:55 pm
this plugin worked great in wordpress 1.5 but not in 2.0
what should be done
January 3rd, 2006 at 12:39 pm
I was using this plugin in 1.5 but upgraded to 2.0 and it no longer works. Any suggestions or chance of an update?
January 3rd, 2006 at 10:32 pm
Thanks for the plugin!
January 5th, 2006 at 10:16 am
Thanks for the plugin. It was very easy to install and works, absolutely great work.
January 6th, 2006 at 5:22 pm
Breaks in 2.0… any fix just yet?
January 6th, 2006 at 7:17 pm
You are a god! Thanks from all of us at www.teamadness.com (just me really).
January 7th, 2006 at 1:55 am
It doesnt work on wordpress 2.0 on http://wwwblog.be
January 11th, 2006 at 2:27 pm
Mine is working, but the post doesn’t seem to wrap alongside seamlessly like it does in your examples.
Link: http://www.meshio.com/
What could be the problem that might have cause this issue?
Thanks!
January 11th, 2006 at 2:36 pm
Problem solved, I edit the adsense.php and wrapped the AdSense code with the following:
Not sure why it wasn’t there in the first place
January 11th, 2006 at 2:39 pm
Buddy I hd the older version of WP 1.5 now got 2.0 please can u tell me what to do to add this new plugin in WP2 now.
Really need it..
January 12th, 2006 at 4:12 am
I am search for adsense plugin for some finaly i got it .I am using this plugin for for my blog http://www.gadioc.com and http://laptops.gadioc.com
January 13th, 2006 at 2:30 pm
Thanks for the plugin! You have helped my Adsense earnings tremendously. Thanks!
January 17th, 2006 at 9:59 am
[…] some useful plugins: Keyword plugin: this plugin inserts meta keyword tag for every post. Adsense plugin: this plugin helps do adsense easily. Originally I […]
January 24th, 2006 at 10:27 am
[…] in journal
This is a test of a plugin that I just found from: http://www.philhord.com/phord/adsense-inline-with-wordpress-blog-posts/ I’m testing it out right now.
[…]
January 24th, 2006 at 5:42 pm
Great Plugin, I am going to try to integrate it into http://www.hostingcommunity.com later tonight
January 25th, 2006 at 2:26 pm
http://www.sns.ias.edu/~jns/wp/2006/01/25/fix-for-irrelevant-ads-in-wordpress-with-adsense/
January 31st, 2006 at 8:54 pm
I’m using WP 2.0 and I can’t seem to find any quicktags let alone the Adsense quicktag. Looking in wp-admin I don’t seem to have a quicktags.js file either. Would installing quicktags.js solve the problem? Where can I it, if so?
February 2nd, 2006 at 12:38 pm
Hi, Thank you for your plug-in,
It worked for me, and my WP is version 2.0.
February 3rd, 2006 at 7:27 am
Im also have trouble using this in 2.0
There is no quicktag at all and adding the code manually to posts doesnt bring up the adsense.
February 3rd, 2006 at 8:18 am
Ok I just found the solution for WP 2.0.
You need to turn off that annoying visual editor when writing posts.
Go to Users and down the bottom untick “Use the visual rich editor when writing”
Now you can see the Adsense quicktag.
February 4th, 2006 at 8:49 am
Hi When applying adesnse code I am getting the following erroe.
Parse error: parse error, unexpected T_STRING in /home/matynne5/public_html/medical-billing-resource/wp-content/plugins/adsense.php on line 47
How do I resolve this error and activate my Plugins for adsense?
Thank you.
February 4th, 2006 at 9:04 pm
Adsense-Deluxe is the way to go:
http://www.sns.ias.edu/~jns/wp/2006/02/04/try-the-adsense-deluxe-plugin-for-wordpress/
It does the same thing and more ….
James
February 5th, 2006 at 3:35 am
hmmm, adsense-deluxe doesnt’ work for me. Not sure if its 2.0 related or what but this plug in works well. thanks.
February 7th, 2006 at 10:44 am
“unexpected T_STRING” suggests that you added or left out a quote character somewhere. Look at your code closely for any typos.
February 10th, 2006 at 5:52 pm
I got AdSense working and all was well and now, for some reason it’s not inserting code any more. I’ve tried reinstalling, but still no go. Any ideas?
February 12th, 2006 at 1:31 am
Thanks this plug in came in handy, for thouse interested this does work with the new 2.0 reliease of WP however i had to manualy type in the
February 12th, 2006 at 1:32 am
do! what i meant was i had to type in the adsence (surounded by the angle brackets and such) tag.
February 12th, 2006 at 6:43 am
[…] � Adsense inline with WordPress blog posts — from the mind of Phord […]
February 14th, 2006 at 8:39 am
[…] I got the plugin from here, on a single sheet which is always nice. […]
February 16th, 2006 at 10:11 am
Thank you very much for this cool plugin. It working perfectly for my WP 2.0 site.
February 16th, 2006 at 2:29 pm
[…] Step 1) Go and download the AdSense plugin for Wordpress and install it. It takes a very small amount of tweaking - you just have to open up the file with a text editor and paste your AdSense code into it. Really quite easy. So go do that now. […]
February 17th, 2006 at 6:14 pm
Thanx, man, i’m using this great plugin on my blog. Let God be wiyh You!!!
February 18th, 2006 at 11:57 pm
[…] Check it out. […]
March 5th, 2006 at 1:00 am
Very nice plugin. I really appreciate your help. You can check out its implementation at http://www.kansascityseo.com/blog/
March 6th, 2006 at 2:48 pm
[…] Adsense inline with WordPress blog posts — from the mind of Phord I was reading this book about optimizing Google s Adsense ( What Google Never Told You About Making Money with AdSense! ). In it, Joel Comm describes how he went from $900/month in Adsense revenue to […]
March 8th, 2006 at 2:32 am
Thanks for share this plugin!
March 12th, 2006 at 5:25 am
this does not work for me…. i do not see any adsense button in my quicktags bar
March 13th, 2006 at 10:12 am
[…] For anyone that is interested in the Adsense Plugin for WordPress, here’s a link to more info: Adsense Within WordPress Posts. Enjoy! […]
March 13th, 2006 at 11:07 pm
Adsense plugin did not work in my blog. There is no adsense button. WordPress version 2.0 I think it does not support version 2.0.
March 14th, 2006 at 1:38 pm
I found the solution above. Just read this:
Ok I just found the solution for WP 2.0.
You need to turn off that annoying visual editor when writing posts.
Go to Users and down the bottom untick “Use the visual rich editor when writing”
Now you can see the Adsense quicktag.
Thanks
March 15th, 2006 at 10:41 am
Hans,
Thank you for advise. It worked.
I started to use it.
March 18th, 2006 at 12:34 am
Great plugin. Thanks you so much for developing it. Installed easily. Php file is commented perfectly.
WP 2.0 users make sure to check the visual editor button on the users menu.
D
March 18th, 2006 at 5:13 pm
[…] from the mind of Phord » Blog Archive » Adsense inline with WordPress blog posts (tags: adsense WordPress) […]
March 19th, 2006 at 6:38 pm
Ah. I should try this too.
March 19th, 2006 at 6:39 pm
I meant for my website www.bizgods.com
March 30th, 2006 at 4:01 pm
[…] From: http://www.philhord.com/phord/adsense-inline-with-wordpress-blog-posts-43.htm […]
April 14th, 2006 at 4:32 am
Aloha,
Isn’t it possible to have some PHP code around the adsense script?
I have tried adding tags from PHP Exec to the script, but I can’t get my PHP code to execute
For example I have tried the code below. It will then show CODE1, but not the random number and CODE2.
$adsense_code = ‘
CODE1
‘;
April 14th, 2006 at 4:34 am
oops, it didn’t like me adding PHP code to your comments.
Inside the php and phpcode tags we have:
srand(time());
$random = (rand()%9);
print(”Random is: $random”);
CODE2
May 5th, 2006 at 1:24 am
Thank you
It’s working fine in my website. added some amazon pic + asense hmmm great mod
oh you can see my site and the plugin here Pets World
May 16th, 2006 at 11:42 am
Thank you - installed and all working fine…
May 18th, 2006 at 7:14 am
[…] After read these two article this and this one , I try to follow it. I added Google Ads here.. But Wordpress is not for commercial purpose. So I decide to create a blog in blogspot, I have my dormant blog there, I activated and renamed become… […]
June 7th, 2006 at 12:14 pm
GREAT PLUGIN! THANKS SO MUCH!
June 13th, 2006 at 12:13 am
Sounds good… I like to try this…
June 18th, 2006 at 1:20 pm
[…] 2. This blog runs on WordPress so I added the Google ads by updating the footer and header files, therefore placing ads on every page with just a small amount of code. Google’s indexing does the ad selection. This WordPress plug-in places ads directly in the body of a post via a tag. […]
June 21st, 2006 at 2:29 am
I uploaded the adsense.php in the plugins directory of my Word Press and also activated the plug. After that I am not sure what I must be doing. Can you please guide me through. i am not sure what this Quicktags tool bar is.
June 29th, 2006 at 7:32 am
Rebecca! Thanks a lot for getting the adsense button to show up in quicktags. I am also using WP 2.0.
Phil! It works like charm!
June 30th, 2006 at 8:04 pm
Thanks for your time and effort. Works great!
July 5th, 2006 at 11:10 am
[…] Adsense Inline - insert adsense in blog posts […]
July 9th, 2006 at 7:36 am
Excellent tips. I was able to increase my CTR by 50% using your advice. Thanks a lot. You might take a look at my site.
July 19th, 2006 at 11:34 am
Hi , thanks for your plugin, i have just downloaded it and currently messing around with my WP to integrate it.
July 22nd, 2006 at 1:48 pm
I’ve done everything you’ve said, and even have the ‘adsense’ button in my quicktags.
However, the procedure I’m following is I click on the button and the ‘adsense tag’ shows up in the screen. Then I just click publish and the adds should show in the preview, but it doesn’t.
Even after logging off and back in. I checked the source view and the code is definitely there.
Any help you can give me would be appreciated. Anyone!
July 24th, 2006 at 10:31 pm
[…] Adsense Inline - inserta anuncios entre los posts […]
July 26th, 2006 at 2:16 pm
Forget the above comment, I figured it out. However, when I go to the quicktags and click the adsense tag, this is what appears
Then what? My code is in the plugin, do I ad