Adsense-Paster Plugin for Wordpress

(Visited 6221 times)

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

adsense-paster.zip

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):

<?php if (function_exists(‘ads_paste’)) ads_paste(); ?>

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

11 Responses to “Adsense-Paster Plugin for Wordpress”

  1. Sekoyen’s » Blog Archive » Pulled Back Adsense Ads Says:

    […] 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 […]

  2. Marcus Says:

    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

  3. sekoyen Says:

    Put it on the website.

  4. Marcus Says:

    And where on the website?

  5. sekoyen Says:

    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); ? >

  6. Prashant Says:

    is it possible to insert adsense inside the post with your plugin?

  7. sekoyen Says:

    i don’t think so, because it is a php code.

  8. Marcus Says:

    Hmm, I’m afraid, ony my side it is not working with the php code you wrote. Always parse_error on the sidebar.

  9. Vins Wang Blog » Adsense Wordpress Plugins Says:

    […] Adsense-Paster Plugin for WordPress […]

  10. Google AdSense: Facts, FAQs and Tools | Smashing Magazine Says:

    […] 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. […]

  11. Os melhores plugins Wordpress para rentabilizar monetariamente o seu blog | Fique Rico Online Says:

    […] Adsense-Paster […]

Leave a Reply

You must be logged in to post a comment.