Writing One Really Simple WordPress Plugin


Declaring the Function

Once a plugin is activated, using it requires calling one or another function from within it. If you're familiar with average WordPress tags you'll know what I mean. Adding

It's really simple and its really powerful but, "with great power comes great responsibility." It's very important when you setup your plugin that you don't duplicate an existing function name. Following the WordPress Codex suggestions you can start by using your own initials, or (as I like to do) the acronym for your site. There are other methods to safely accomplish this but we're going dead simple so we'll cover those later.

We'll use the prefix rotw_ (Return of the Whatzit) here:
the functionfunction rotw_showAd() {
// next step will go here
}

From there we add the important stuff.

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