Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Outline for How to Build a WordPress Plugin Project [Feedback Wanted!!!]

Hi Folks!

We've had a lot of folks requesting more advanced WordPress content, like how plugin development and I'm excited to announce we're almost ready to start recording.

Based on student feedback in another post I've decided to make this project a bit shorter (only around 20 videos). I'm not going to change this approach, so don't comment on that part :p but I would love folks feedback on the actual content covered.

So here's the outline:

  • How WordPress Plugins Work
    • What is a WordPress Plugin?
    • An Overview of WordPress Actions and Hooks
    • Examples of How to Use WordPress Actions and Hooks
  • Building a WordPress Plugin Settings Page
    • Basic Markup for WordPress Settings Pages
    • Working with Forms in a WordPress Plugin Settings Page
    • CRUD with WordPress Plugin Option Settings
  • Connecting 3rd Party APIs with WordPress Plugins
    • JSON as an API
    • Parsing JSON with PHP
    • Storing and Displaying Content from a JSON Feed
  • Building WordPress Template Tags, Widgets, and Shortcodes
    • How to Create Custom Template Tags
    • How to Create WordPress Widgets
    • How to Create a WordPress Shortcode
  • Launching and Supporting a WordPress Plugin
    • The Readme.txt File
    • Adding a Plugin to the WordPress Repository
    • Updating Your Plugin
    • Supporting and Marketing Your Plugin

I would love folks feedback on the following:

  • What do you see in the outline that you really like
  • What do you think is missing from the outline
  • How would this content help you build your own plugins

Thanks everyone for being so awesome and providing such helpful feedback! I'm all about trying to get content that will best help you :)

12 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hi Folks!

Now that I've finished most of the recording for the project I can provide more of a finalized outline:

Project Overview

  • How WordPress Plugins Work
  • WordPress Plugin Project Overview
  • An Overview of WordPress Actions and Filters
  • Examples of WordPress Actions and Filters

Building a WordPress Plugin Settings Page

  • How to Create a Plugin Template with a Settings Page
  • Basic Markup for WordPress Settings Pages
  • Adding CSS to WordPress Plugin Settings Pages
  • Working with Forms in a WordPress Plugin Settings Page
  • CRUD with the WordPress Options Table

Connecting WordPress Plugins with 3rd Party APIs

  • JSON as an API
  • Getting and Storing a JSON Feed
  • Parsing JSON with PHP

Building WordPress Widgets, and Shortcodes

  • How to Create WordPress Widgets
  • Adding Settings to a WordPress Widget
  • How to Create a WordPress Shortcode
  • Adding AJAX To Plugins on the Front-End

Launching and Supporting a WordPress Plugin

  • Writing Good Documentation
  • The Readme.txt File
  • Adding a Plugin to the WordPress Repository
  • Supporting and Marketing Your Plugin
Jarrod Parkes
Jarrod Parkes
Courses Plus Student 10,884 Points

Hey Zac, is this series up for viewing yet? I'm in the process of customizing the WooCommerce plugin (the correct way, by using functions.php), but have no real grasp of actions and filters. This serious would do wonders for being able to customize WooCommerce the way I want it to work, while still allowing me to update the plugin without erasing any of my changes.

Zac,

I'm glad to see that you're covering an often neglected side of plug-in development - Launching and Supporting a WordPress Plugin

Matt Campbell
Matt Campbell
9,767 Points

This will be fantastic Zac Gordon and tie in really nicely with Randy Hoyt and Andrew Chalkley teachings. Was just thinking to myself today...how shall I implement this Google map on a page. Shall I just grab a plugin and use those options or shall I mess around doing it as a one off in jQuery and PHP.

If I really knew how to use WordPress's plugin engine....I could do a contact/about us page plugin and use it over and over again.

By the way....we've got to come up with a better name for contact and about us pages as there's more things and interactivity to put on them. Maybe Bio???

Guido Grulke
Guido Grulke
20,948 Points

great to read about the new wp content - thanks. I like the most: Building & Launching

It would be outstanding, if there's a sequenz about testing my plugIn or meet quality criteria to get listed at wp.org.

I'm already excited about the challenges and/or quiz you will include.

@Matthew: fully agree to the more interactive contact & about pages.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Just realized there will also be a working with AJAX video under the templates and widgets stage :)

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

No time frame yet I can say. Still in the writing phase, although have solidified the outline. As soon as I have the details I will let everyone know and post it on the roadmap.

However I can say that we plan to release the entire project at once, so instead of having to wait for each stage you can do them all right away. This will take a couple extra weeks but we've had really good feedback on doing this with other courses.

Matt Campbell
Matt Campbell
9,767 Points

Zac Gordon - to add to my previous comment, I think a Treehouse group project to make a proper import/export plugin would be awesome. Something that actually zips the files, database, your menus, images...the works, and is a click of a button and installed.

I may be missing something but reading around the net, there's nothing that seems to do it and there is NOTHING more annoying then uploading from local to live and having to repeat a load of work. It's nothing difficult, major or project breaking but it is very annoying.

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

Hey man, this would be probably more than we would ever want to tackle as a project here :p But there are tons of great options for backups. We use BackUpWordPress in the how to make a blog project, but there are tons others. VaultPress is probably the biggest ones out there, but it's a premium service.

Awesome. Is that also going to include filters, and actions in depth?

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

Arman Keyvanskhou that's a really good question and raises a bigger question for me: What do you consider in depth?

As you can see we have 2 videos dedicated completely to looking at these concepts and examples. And then of course we'll use them throughout the project.

However, it's tough for me to know if we cover something enough, because in depth is different for different people. Do you have good examples of WordPress (or other) content we have done well covering in depth in a video or two? This is really helpful, thanks!

What sort of time frame are we talking for the release of all the content in the original post? i am really interested in the short codes etc all the little detail bits to add to a theme that make them good quality.

Hey Zac Gordon , I really liked the API JSON section of this course and have used it successfully to create a plugin to pull personal bandcamp releases into WordPress (no need to create custom posts or products etc.)...

There is one thing that I am having difficulty with though - The bandcamp API lets you pull the discography in one JSON file which contains information about each release (similar to the Treehouse profile info), but it does not provide the complete information. To get each release's tracks and further info, there is a separate call to each album_id or track_id using a different url for each.

I have written a number of options and cannot quite seem to get it. To make it clearer, I call the discography much like the treehouse profile in this course... but then I loop through each result and pull out "album_id" and "track_id". I then store them in arrays $album_ids and $track_ids, then need to run a foreach( $album_ids as $album_id ) { get each albums json feed and store it in database to call upon }.

I'd like to make this populate the database in the most efficient way possible so it does not slow down page loads or anything, although, if I can make the API work from the admin, so frontend just calls the DB, that would be awesome and not matter so much about the speed.

I hope this makes sense and that I have posted in the right place to get your help. Thanks!

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

Howdy! So cool :) Yes, you are taking the write approach. You will likely have to write custom functions to build out your own feeds that combine all the information you want.

I ended up getting it under control by creating extra functions as you said for albums loop and tracks loop... I stored it in the same table between the first and the time updated. I managed to get some php to display everything but its not quick enough and I need to create a thumbnail layout of album covers, then click one and it loads that albums player and playlist into the page. That way it doesnt load all 69 releases on page load. Thanks for your insight :)

Dominic Francis
Dominic Francis
5,048 Points

I think it would be great if you could do a tutorial of how to create a shortcode but then add it to the tinymce?

Could just start with creating a simple shortcode that just returns a string and then one that returns attributes too.

Many Thanks