How To Create A Simple (Database Using) WordPress Plugin – Sample Code

At the January meeting of Web414 at Bucketworks, Jeramey gave a presentation on how to create a simple WordPress plugin. The plugin supports adding and listing members of the Web414 community using jQuery (AJAX).

The code is available to download in a super small zip file (web414.zip).

  1. It can be installed by uploading it to your “wp-content/plugins” folder, and activating it from your WordPress dashboard.
  2. It will require the creation of a database table in your WordPress database. You can see the structure of how to do that in included file (web414.php), and grab the code to copy and paste into PhpMyAdmin (if you like things quick and easy).
  3. To make the plugin appear on your site you will need to include two different shortcodes on any of your pages. They are “[add_web414member_finished]” and “[list_web414_members]“. Put them on any page and after activating the plugin they will appear. The add a member function will only appear to logged-in users.
  4. Extend this as you wish.

Let me know if you have any questions or comments, we would be happy to help you get starting writing WordPress plugins.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>