Sunday, February 13, 2011

WordPress Plugin Development

Besides the CODEX what resources do you recommend to help a person new to creating plugins help create a WordPress plugin. I have an idea, but need a bit better explanation than what is in the CODEX to get started.

UPDATE: Is there a book that I could buy to help me out with this?

  • Having written the MyBlogLog plugin (the original one, that is) I found that the Wordpress Hooks list (can't remember the link offhand) was incredibly useful, as was the sample code from the Codex and WP Install files. Reading through other developer's plugins is also a good way to learn, as you can see how they implemented things and use those techniques to save yourself some R&D time.

    What are you looking to create, anyways?

    Edit:

    I posted a comment with this, but just in case it gets lost...

    For your specific needs, you're going to want to store data and be able to manage and retrieve it so creating a custom database table in your plugin is something you will want to do. See this codex link:

    http://codex.wordpress.org/Creating_Tables_with_Plugins

    Then you can just add your management code into the admin screens using the techniques found on this Codex page:

    http://codex.wordpress.org/Adding_Administration_Menus

    If you want to display the items on a page, you can either write yourself a custom PHP WP Page template to query the DB directly:

    http://codex.wordpress.org/Pages#Page_Templates

    Or just add a hook filter on your plugin to write the results to the page based on a keyword you specify:

    http://codex.wordpress.org/Plugin_API#Filters

    Mike Wills : I host a indie music show where I get a lot of submissions from bands. I am looking for a better way to accept and organize the songs they submit. I want to build into WP to keep it all in one place.
    Abyss Knight : Awesome! You'll probably want to use a custom MySQL table for that sort of thing. That's a bit more advanced than the overly simplistic stuff on the Codex. This page in the Codex might be useful: http://codex.wordpress.org/Creating_Tables_with_Plugins
    Mike Wills : Thank you very much. Looks like I have some reading to do...
  • Although technically still information found within the Codex, the Codex contains links to external resources. Apologies for not posting a direct link, but look again, and you should find them.

  • Here is a useful set of links on how to do Wordpress plugins. Be aware that it is relatively "advanced" (in that it introduces a number of object oriented methods to the process). You should really read the Wordpress Codex stuff first.

    From gaoshan88
  • I think one of the most important resources is the code used in other plugins.

    Not necessarily doing what yours does, but ones that use have features you want to implement.

    For example, if you want to find how to create an options page, you are going to work it out pretty quickly if you see how all the others do it.

0 comments:

Post a Comment