I wrote a similar article dealing with Auction Ads in reversing ad blindness. Now, I’ll show how to do it with AdSense in WordPress.
Google doesn’t allow any modifications of their code so, we can’t actually go into the AdSense code and insert a custom PHP code. Instead, we’ll take the long route and do it on the safe side so, we won’t have to piss off Google.
Take a look at an AdSense code below. I circled the format size of the ad in red and I circled the header link code in orange. In this method, you’re going to be using multiple AdSense blocks so, make sure all of the ad codes are in the same format. When using multiple AdSense codes, pay attention to the google_color_link line, make sure each code has a different color of your choice in that line.

Plug-ins Required
You thought you wouldn’t have to use any plug-ins, huh? Lolz, we’re going to need plug-ins. We need two plug-ins to make this method easy as possible
The first is the Exec-PHP. That plug-in is required to call a PHP function within the post, to call up the AdSense code. In WordPress you cannot enter <?php ?> so, we need that plug-in.
The second plug-in that’s required is none other than the popular AdSense-Deluxe, thank you Acme Technologies.
Install the Plug-ins
Upload the plug-in files to wp-content/plugins directory in your WordPress server and activate them in your WordPress admin’s page.
Setup the Ads
Now that we have both plug-ins installed, it’s time to set up the AdSense ads. In your WordPress admin page go to Options > AdSenseDeluxe. On that page choose “Add New”; take a look at the image below.

Insert your AdSense code in the white box underneath where it says “AdSense code”, duh
. Take a look at the code below. As you can see I added few other codes before and after the AdSense code, so words would wrap around the ad. You don’t have to add the extra code, you can just add the AdSense code, but it looks better if you have the words wrapped around.
<table align="right"><tr><td>
<script type="text/javascript"><!–
google_ad_client = "Your AdSense code";
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = "250×250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "003366";
google_color_text = "000000";
google_color_url = "7F7F7F";
//–>
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
After you have done that, on the far left box give that AdSense code a name, where it says “Name”; as you can see I’ve chosen “adblock1″ for the name. After you have done that, on the far right side click on the button where it says “Add AdSense Block”.

Now that you have added your first block, do it again four times, but every other time make sure a different color is chosen in the google_color_link line (ex. 000080, 880000, etc). By doing so, every other ad block will have a different link color. Also give similar names to each ad with sequencing numbers such as “adblock2″, “adblock3″, “adblock4″, “adblock5″.
Now, when you are writing a post, insert the following code in the beginning of your post.
<?php
$title[0] = "1"; // AdSense 1
$title[1] = "2"; // AdSense 2
$title[2] = "3"; // AdSense 3
$title[3] = "4"; // AdSense 4
$title[4] = "5"; // AdSense 5$randomize = rand(0, 4); // Change four to how many arrays you
have?>
Then insert the call code
<!–-adsense#adblock<?php echo ($title[$randomize]); ?>–->
within your post, and you should see your ad block come up with random colors.
If you gave your AdSense ads names other than the ones I recommended, adblock1, adblock2, etc. then place those names after the “adsense#” call code. If you didn’t give your AdSense ads different names then stick with the exact code from above.
To see an example of what I’ve done, refresh this page to see the random colors on the ad at the beginning of this post. If you don’t see any ads then click on the title of this post to see it on a single page.
This doesn’t have to be within any posts, you can display AdSense ads with random colors in your blog’s sidebar if you wish. I hope this helps, try it out. Tell me what you guys think.
|
24 Responses
Andre Santos
June 24th, 2007 at 7:50 pm
Very good tip. I’m having a problem using Adsense Deluxe, and you might be able to help me. As u know, we can only have 3 blocks of adsense on each page. So, i have one at my template, and want to add 1 to each of the first 2 posts on the page, but when i make a new post, it doesnt show the one in the template but 3 on the first 3 posts. Do you know how i do to always show the one in the template?
Thanks
Jakob Dupont Knudsen
June 25th, 2007 at 12:27 am
Well I probably don´t have enough visitors to actually see if this makes any difference, but I like the idea! Great post, and a good explanation. Thanks.
kuanhoong
June 25th, 2007 at 3:57 am
Interesting plugin. But I do agree with Jakob, if you don’t have enough visitors then it doesn’t make any difference.
Nice Info!
Ken Xu
June 25th, 2007 at 5:41 am
New Idea here!
But, will it make any different to the CTR?
Sunny
June 25th, 2007 at 8:06 am
@Andre: if your AdSense ad is on ur sidebar then it wont work. You gotta think of the order left to right. The first three AdSense on the left side will work.
@Jakob: It will increase your CTR. It depends though, each site has different results.
@kuanhoong and @Ken: Try it out, and see if it improves your CTR
Andre Santos
June 25th, 2007 at 10:46 am
Okay, thanks anyway.
Bloggrrl
June 25th, 2007 at 3:53 pm
What an excellent post! Thank you for the visuals for code newbies like myself. I’m excited. I made two dollars from Adsense yesterday. I am going to be rich, bawahaha.
Sunny
June 25th, 2007 at 5:54 pm
@Bloggrrl: Lolz, I’m glad you understood the post. It took me 2-3 hours to write it and check it to make sure the method works perfectly. I hope your earnings grow but don’t just depend on AdSense, diversify your income.
John
November 21st, 2007 at 8:11 pm
tTZ1ie 3v3445vtt075nvn0g8d0nb
bob
January 24th, 2008 at 6:31 pm
7yRWcS nice site thx http://peace.com
lola
March 19th, 2008 at 9:18 pm
bookmark you thx
bob
March 24th, 2008 at 6:21 pm
3K2AO3 good site thx http://peace.com
bob
March 24th, 2008 at 6:23 pm
ryA8MT great work thx http://peace.com
liza
March 28th, 2008 at 1:47 am
hay
airfares
May 21st, 2008 at 4:21 pm
cool site thx airfare deals
Ydwdbyzx
June 14th, 2008 at 2:23 pm
interesting post thx http://google.us/group/dteens hot preteens 18711
Ypcjvuox
June 14th, 2008 at 2:25 pm
http://google.us/group/llteens preteen boy pics =-)))
Xzsnnrrq
June 14th, 2008 at 2:25 pm
best work man great http://google.us/group/tteens nued teen pics cxmpz
Ahkfcuou
June 17th, 2008 at 3:41 am
Nice stuff, ïîäðîñòêè äåâî÷êè ñåêñ, >:-],
Xmweoygk
July 13th, 2008 at 7:47 am
This is a best site, 3gp áåñïëàòíî ñêà÷àòü, %O,
Efqwnatv
July 18th, 2008 at 2:04 am
Nice stuff, http://sites.google.com/site/analcreampiemovies1/lesbian-anal-movies lesbian anal movies, 8975,
Gxtckkrn
July 18th, 2008 at 9:37 am
Preved webmastero4ki, http://sites.google.com/site/analcreampiemovies1/lesbian-anal-movies roccos true anal stories, 62075,
Yiasptjc
July 18th, 2008 at 11:46 am
Nice stuff, http://sites.google.com/site/analcreampiemovies1 mens anal toys, akfjbk,
Jessica Taylor
August 11th, 2010 at 12:34 am
it seems that my Adsense earnings this month have plumetted. i don’t know why ;
RSS feed for comments on this post · TrackBack URI
Leave a reply
Great Links
Categories
Archives
Top Commentators
wholesale wedding dresses (1)jane (1)
About Me
Subscribe
Calendar
Recent Readers
Great Posts
How to Make Money with Low Blog Traffic, No BSHow to Make Money from YouTube
Indian Guy Gets Caught Cheating on His Wife on the Radio
2x, 3x, or Even 4x your AdSense Earnings, Guaranteed!
Start Getting LinkBacks Effectively, No BS
Recent Entries
Recent Comments
Most Commented
Blogging with Vinay at Desinotes is proudly powered by WordPress - BloggingPro theme by: Design Disease
Rice Bowl Journals Best of Indya