Matt Cromwell Avatar
I’m working on a project right now that requires some changes to a very complex and large premium WordPress theme….

I’m working on a project right now that requires some changes to a very complex and large premium WordPress theme. It’s a very powerful e-commerce theme that has a ton of plugins and shortcodes baked into it. The problem is my client really just likes the layout of the theme, and really doesn’t want all the bells and whistles. So the first thing I’m doing is stripping the theme of all the excess. But this brings up three major concerns:

mattress tag
Photo courtesy of “drl” at Flickr.com
http://www.flickr.com/photos/mbk/2338576127/

1. The Mattress Tag

The trouble with working with themes — especially premium themes — is they come with a secret “manufacturer’s warranty”. Basically, if you expect any help from the theme developer at any time in the future… don’t mess with his/her theme. Don’t break it, don’t edit the files directly. It’s like that tag on the mattress, if you cut it off, your house fire is all your fault!

2. Future-Proof It

There’s another concern in tweaking premium themes, besides that the theme developer won’t like it. If the developer does ever push an update and you hit “update theme”, you loose all your customization. Nobody’s got time for that!

3. What Happens in Vegas, Stays in Vegas

Lastly, if you’re working on a client site, you may think you’re gonna keep that client forever… but probably not. Turnover happens, and, if you’re lucky, your business is going to grow and you’re going to have other staff working on sites in the future. If you just start going in and making changes all over the place no one who comes through there after you is ever going to know what you did.

My Solution(s)

Doing this stuff well all starts with your mind-set. (1) Respect those that make stuff well and provide it to you for free or sell it at radically low cost to you. There are tons of really high quality stuff out there available at pennies on the dollar compared to the working-hours put into them. Respect that. (2) Make sure your work is always future-proof. In the case of working on a premium theme, don’t change the theme directly, make a child theme and edit that. Easy! (3) Mark-up what you do with VORACITY. Make it ultimately clear that:

// ### THIS SECTION HERE WAS NOT ORIGINAL TO THE THEME
// ### I DID THIS... ME ALONE. EMAIL ME IF I MESSED YOU UP
// ### HERE'S MY EMAIL [email protected]

When it Doesn’t Go As Planned

So all those things are important to me and I try to do all of that all of the time. But on this particular theme, I couldn’t keep the edits to just the child theme. I won’t go into detail, but basically, I had to add some code to the parent theme’s functions.php file.

WARNING, WARNING, DANGER, DANGER Never do that! Ug!

I wish I could have avoided it, but I couldn’t. So suddenly, even though I marked it up really clear, my client can’t update his parent theme if updates come out. No fun. So I thought to myself:

“Self, I wish I could put a big “READ THIS BEFORE UPDATING” on the theme page”

So, as in most things WordPress related, whenever you find yourself wondering about stuff, the CODEX is your friend. This fancy little piece of code let me make a link to a custom markup page on the theme options page.

add_action('admin_menu', 'my_plugin_menu');

function my_plugin_menu() {
	add_theme_page('My Plugin Theme', 'My Plugin', 'read', 'my-unique-identifier', 'my_plugin_function');
}

Here’s the screenshot (theme name obfuscated since the site is not live yet).

Viola!

So now, I’ve made the changes I need to and they can be easily replicated whenever an update comes out, and anyone who ISN’T me will be able to figure that out too. Happy Days!

4 Comments

  1. Hi Matt, great article. I run into this same issue all the time. Brandon Dove showed us a theme called Capsule by Crowd Favorite that allows you to create a Developers Journal. It’s awesome because you can paste in code, make notes, assign to a project and tag. This way if you need to come back to a project you can easily find any thing you added and noted. Also great for finding those snippets of code you used on one project that you would like to reuse on another. I have only been using it a couple of days but already love this idea.

    1. That looks interesting for sure. I have to say that I prefer having the info exactly where it’s relevant. In this case having a big “Read me before updating” is super helpful. But Capsule looks super powerful as well. I’ll give it a spin sometime. Thanks for pushing the conversation!

Leave a Reply

Your email address will not be published. Required fields are marked *