Writing One Really Simple WordPress Plugin


Final Steps

Once you've filled out your plugin like we show above you're set to go - almost. Save it with a catchy name (remember to end with the .php filetype) and save it to your plugins file. Go to the Admin panel and you should see the plugin listed and ready for activation.

If you don't see your plugin ready to "Activate" go back and check the header to make sure its write. Small typos can stop the plugin from being recognized by WordPress!
The final step is to call the plugin from your theme file. Now, while you can setup plugins to work throughout the theme, this plugin requires that it be called directly. Just head to the theme page where you want the plugin and add the appropriate code, .

Building on this File

If you want to get more creative, you can add several functions to the plugin which will call multiple AdSense ads. Creating a function called rotw_banner could be set to call a banner at the top of the page, rotw_sidebar could be set to call a sidebar ad, and on and on. Just duplicate the code above and move it around as you'd like.

Get creative, and you can do a lot of more specialized things as well. A little creativity and the basics provided here can accomplish a lot.

That's it... one really simple WordPress plugin.

Pages: 1 2 3 4


One Response to “Writing One Really Simple WordPress Plugin”

  1. July 25th, 2006 at 6:59 am

    The necessary plugin (:
    It is established easily and perfectly works.
    Thank u so much!

    - Jimy
Leave a Reply