Remember that scene when Neo’s brain was plugged into the Matrix and he instantly learned Kung Fu? While an epic Kung Fu battle doesn’t usually follow the creation of a plugin, there’s a similarity between the awesomeness that occurs when a custom plugin is installed and when knowledge is uploaded into Neo’s brain.

Plugin creation allows a developer to extend the functionality of WordPress. By creating a plugin, you can instantly deploy new functionality to any site you create and allow others instant access to the same increased functionality. In other words, the customizations and additional functionality you create are instantly transferred from the matrix (you) directly to Neo (your WordPress site). OK, maybe I just wanted an excuse to post links to the Kung Fu fight scene, but you get the idea.

Problem solving with plugins

I set out to solve a unique issue when I created my first plugin. I had just installed the Divi theme from Elegant Themes and noticed the pre tags on my website weren’t displaying correctly. It seemed that in the particular version of Divi I downloaded, the CSS to format pre tags was missing.

Of course, instead of contacting Elegant Themes directly regarding the problem, I decided to scour the Internet for the default pre CSS style (in hindsight I could have just looked at core WordPress, but I digress).

What I found were tons of interesting and creative pre styles to add personality to the code samples their creators were sharing.

But updating CSS was too difficult a task for some, I thought. What about someone new to WordPress who understands the concept of a CMS but not front-end design? What about the developer who understands CSS, but isn’t fantastic at making things appear just right?

It was time to take action. After hearing a presentation on “Writing Your Own Plugins” by Pippin Williamson at WordCamp Kansas City, I had the excitement, neigh, jet-propelled enthusiasm, to make my first plugin. His talk was like a shot of adrenalin. I felt invincible as I scrambled to my computer to write a plugin to allow someone to easily customize their pre tags with the click of a mouse. To my surprise, I created a plugin within a matter of minutes which would slowly and iteratively become Pretty Pre. No longer would WordPressers need to settle for ugly pre tags; I had saved the day!

Plugin creation resources

There was a short learning curve to get the plugin created, compliant, and into the public WordPress repository. Here are some resources to help you create your first plugin:

It’s a great feeling when you realize that you’ve created something that contributes to the community and that other people are using on their sites. That sunny day in Kansas City, I felt like Neo because I had added a new skill to my arsenal. I hadn’t learned Kung Fu, but I had learned to kick ass a little more as a developer, and that was alright with me.

Is there a resource that you found useful when creating your first plugin? Please share in the comments below. Need some help getting started? Give me a shout @ifyouwillit.

Wordcamp 2014