Adsense-Paster Plugin for Wordpress
This is my very first Wordpress plugin.
It is a very simple plugin.
Actually, I use it as a short way to ON and OFF the adsense on neyokes.com. If I want to do some works, I will diactivate the plugin from administrator panel. Then after finished, I will activate again. Why? Because I am afraid I will unintentionally click those ads
. It also make my job to insert adsense ads into any part of templates easier.
Off course it have other feature. It can rotate the ads randomly!
You may browse neyokes.com to see this plugin in action.
Adsense-Paster
Features
1. Show adsense ads
2. Rotate adsense ads randomly
Download
Installation
1. Extract the zip file.
2. Modify to your absolute path of adsense-paster directory in adsense-paster.php
3. Upload all file including the directory to your plugins directory.Â
4. Add this to your template probably in index.php, sidebar.php or single.php where you want adsense ad to show up (I prefer to display the ad only on single.php page):
Default parameters for ads_paste()
$ads_name = ‘ads_0′ –> ads name you want to show.
$random_pick = false –> true or false
$random_begin = 0 –>start number
$random_end = 0 –>end number
Example :
$ads_paste(ads_3) –> to show adsense in ads_3.php
$ads_paste('’,true,1,5) –> to randomly choose a file from ads_1.php to ads_5.php.
$ads_paste('’,true,6,9) –> to randomly choose a file from ads_6.php to ads_9.php.
5. Copy and paste your adsense code in a file and name it with ads_#.php. Create other codes with different ads format and paste it on other file with different file name. Examples of file names ads_1.php, ads_2.php, ads_3.php. Do not use ads_0.php, because it is for emergency purpose.
6. Upload all those files in adsense-paster directory under plugins folder.
7. Activate the plugin.
Category: Wordpress, Adsense
May 4th, 2006 at 5:56 am
[…] I have written a wordpress plugin adsense-paster, but you will not see the demo on my site for the moment. May be you could try it yourself on your site and if it is useful for you, please give some comment. Fortunately, with adsense-paster plugin, I just need to diactivate it to stop adsense ad from showing on my entire site […]
August 17th, 2006 at 12:59 pm
Hello!
I’ve problems with random ads eg: $ads_paste(’’,true,1,8)
Where should this part above be included, if I want random ads? In the adsense-paster.php? Or in the website e.g. sidebar.php?
Thanks,
Marcus
August 18th, 2006 at 2:07 am
Put it on the website.
August 18th, 2006 at 11:40 am
And where on the website?
August 18th, 2006 at 4:56 pm
4. Add this to your template probably in index.php, sidebar.php or single.php where you want adsense ad to show up :
< ? php if (function_exists(‘ads_paste’)) $ads_paste(’’,true,1,8); ? >
August 20th, 2006 at 9:03 am
is it possible to insert adsense inside the post with your plugin?
August 21st, 2006 at 6:35 pm
i don’t think so, because it is a php code.
August 25th, 2006 at 11:19 pm
Hmm, I’m afraid, ony my side it is not working with the php code you wrote. Always parse_error on the sidebar.
March 1st, 2007 at 5:52 am
[…] Adsense-Paster Plugin for WordPress […]
March 22nd, 2007 at 8:58 am
[…] Monetizing WordPress Plugins: an overview of 8 AdSense-Plugins you can use with Wordpress blog engine. AdSense Widget Wordpress Sidebar, AdSense Paster, AdSense Injection and more. […]
May 21st, 2008 at 6:45 pm
[…] Adsense-Paster […]