The ability to seek out forums where others are asking questions, debating techniques, and solving problems similar to our own is one of the best things the internet has given us. In particular with WordPress, there are many active users participating in numerous forums helping each other out every day.
Almost without exception when custom functionality is discussed in WordPress forums, the proposed solutions will either advise readers to put code in the theme’s `functions.php` and/or `style.css` file. While there are good reasons that these two files are the default point for code insertion (everybody’s got ’em, after all), there is great value in isolating pieces of code that are general enough to “do one thing and do it well.”
In this talk, we will walk through a fictional case study that illustrates how one might go from “adding code to the functions file” to creating an original plugin. We’ll begin with a specific solution that applies to a single site, and we’ll end up with a generalized piece of functionality (i.e. a WordPress plugin) that can easily be ported from site to site regardless of the theme being used.