Tutorial: Write a Sitemap Plugin Day 2

Now we have a clear idea of the final product, so we can start to structure the plugin. Opsss, and the name? It can sound incredible but on the WordPress Plugin Directory the name “sitemap” is available.

So our plugin will be named “sitemap”.

Let’s start creating a folder named “sitemap” and the file “plugin.php” inside it. I’m used to call the main plugin file “plugin.php” it’s clear to understand (in a plugin there will be more than one php file). Surely, if you’re working with an IDE (like NetBeans) on more than one plugin, this name can create confusion (if you are a new by programmer…).


Tutorial: Write a Sitemap Plugin Day 1

I wrote a number of plugins and every time I review the code of them I found someting can be improved or adjusted. I’m not talking about bugs but different way to implement the plugin actions. This tutorial will be a set of post where I dissect “my way to write a plugin”. I don’t think it’s the best, most complete tutorial, but it m ay be useful… so… lets start.

Before all we need to decide the plugin purpose, it’s features, it’s limits. I want to write a very (very) simple plugin to generate a very (very) simple XML sitemap of this blog. As you know there are such kind of plugins, there is no need to write a new one, but this is a tutorial!


Dynatags help

Ask here questions about Dynatags plugin leaving a comment. Try to be clear for me and for other readers. Do not write “it doesn’t work” without giving deep information on what is not working.