DJ Billings
WordPress Dev, WordPress Help

Is It Hard To Develop a WordPress Theme?

Short answer, yes. Gratifying? Also yes.

I’m going to share my experience getting started in developing a WordPress theme but first, a fun and somewhat related story.

I own a 1966 VW Beetle named Helga. When I bought her, she ran okay but there was a big hole in the fuel tank which meant that not only did she run out of gas really fast, you wound up smelling like fumes if you rode in her. That was fix Number One, for obvious reasons. After that, I worked on the brakes (which suddenly stopped working one day while taking my daughter to school). Then there was the eensy little problem of not having brake lights or turn signals. But hey, that’s kind of what you sign up for when you buy a 50-year old classic car. TL/DR

Most of the repairs on Helga were straightforward. Armed with some experience, online forums, a book, and YouTube videos, I did pretty well. The wiring problems on the other hand were, at the very least, fiendishly maddening. It seemed there was no one who could just give me a straight answer on what was wrong or how to fix it. The answers were usually along the lines of “Just look at the wiring schematic.” Which is great advice when you know what you’re looking for on the schematic. In my case, I didn’t know a relay from a grounding wire.

It’s just like writing CSS, right?

Then one day, after months of pouring over gobs of information and hunched over the wires, trying new things and breaking a lot of things that were already fine, something just clicked. I knew exactly what had to be done. Long story short, all her lights and signals work now.

Web development is exactly like this.

Currently, I’m developing a WordPress theme using _s underscores as my base. It’s my first foray into theme development. After a couple months of messing around, I was left trying to figure out why none of my changes to style.css affected anything at all. Fiendishly maddening. And most of the tutorials out there end with, “Now just change whatever you want in your style sheet and have fun!” It was exactly like my adventures with classic VW wiring schematics.

My new theme, out of the box. It stayed like this for weeks.

Alas, I was not having fun yet. I put it away for a couple weeks and worked on other things. Worked on improving my CSS. One day, in the middle of a CSS tutorial, something clicked. Just like Helga’s wiring. I paused the tut, fired up Mamp and opened up my theme files. I tried a couple new things. Suddenly, stuff was changing on the site. I even said, “Yes!” out loud. I spent the rest of the next couple days writing code that actually affected the theme.

Now we’re cooking with gas.

I’m still working on it, it’s nowhere near finished. For example, I still need to create functionality for things like better customization and templates. I’m developing the theme specifically with indie musicians mind, so there are some built-in features that I’d like to offer them to make it easier as they build their sites. At this point I’m just making things pretty. But experiencing the feeling of actually having your code do what you want it to do is so freakin’ gratifying. Now it’s fun.

Even though underscores is commented very well, there were a few very basic things that I didn’t understand about it. Once I cleared those hurdles, I was on my way. They were:

  1. You have to write your own CSS to make anything happen. The style.css file looks populated, but it’s mostly code for normalizing the CSS.
  2. You’ll need to work with the PHP files to make some things work. For example, if you want to use a custom header image (instead of just title and tagline), you have to call it in header.php. See the custom-header.php file (lines 3_9) for help.
  3. Just go ahead and break stuff. It’s the best way to learn. If you want to play it safe, every once in a while save a copy of style.css somewhere as a backup.

That’s about it, really. Like typical web development, it’s just plugging and unplugging wires and seeing what happens. Solving little puzzles along the way.

It’s just like wiring a 1966 VW Beetle, right?

If you’ve ever thought about developing a WordPress theme, I highly recommend it. You’re going to bump your head against lots of walls and break a lot of things in the process. But it’s worth doing, even as an exercise. I’m not ready to write a tutorial on it yet, but if you have questions, I’ll answer as best I can.

By D.J. Billings

I'm a WordPress fan geek and I love to help people with their WP websites.

2 comments

  1. My first theme building experience didn’t go well. Back in 2011 I did everything wrong. Hard coded urls in the template. HTML in the post editor. Embedded content in sidebar.php. Let’s just say I’ve improved a lot over the last 9 years.

    1. One of the things I’m learning is to “fail early and fail often.” Doing stuff wrong and having to correct it really pushes you forward. That is, if you don’t first injure yourself beating your head against a wall.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.