Don’t Worry, You’re In The Right Place
A lot of these posts were originally on SureFireWebServices.com. So if you found them through search engines or clicking around, this is their new home :). Enjoy!
0

5 tips every theme developer should abide by…Forever

Angry Computer Guy

Creds: PixelR3AP3R and Me

Dear theme developers,

I was recently working on a Word Press theme I purchased from Theme Forest. At first glance it was nice, but then…..

So here are a few tips on tidiness for all those that LOVE to make Word Press themes and sell them to people like me!

Tip 1 – Is it that !important

Really, is it!? When you are working on a website from scratch, please understand that you have full control. The only reason you will need to use the !important declaration is when you need to override another style.

The problem is that when I need to override a style, you already placed !important on it. So I’m troubleshooting for 20 minutes wondering why the style I added isn’t changing anything only later to say “OOOOOOOoooohhhh, the style has !important on it.” Stop it.

Tip 2 – Use JQuery the right way… and only once.

Well this was a complete test of patience. The client requested a blog post slide show, which of course used JQuery. My issue was when I installed it, it wasn’t working.

“Hmmmmmm,” I said to myself, “Let me look at the plugin code and make sure it’s all correct.” It was. I even downloaded JQuery Cycle again to replace the old file, still nothing worked. Error Console kept saying the function did not exist.

Then there’s that little snippet of code that always gets over looked:

[code language=”PHP”]<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"><!–mce:0–></script>[/code]

Ah Ha! That’s not supposed to be there!!!

Here’s the thing; when you call JQuery using Word Press you are not supposed to call it like that. What you have to do is the following:

[code language=”PHP”]<?php wp_enqueue_script(‘jquery’); ?>[/code]

This theme was calling it both ways which was causing a conflict with the code that I was trying to add.

Stop it.

Tip 3 – Add body classes and your CSS life will become so much easier.

Word Press has a neat little function where it automatically adds classes to the body where ever you are. It looks something like this:

[code]<?php body_class($class); ?>[/code]

Why is that awesome? Because now the code on the page looks like this:

[code]<body class="home blog logged-in content-sidebar">[/code]

 

And I can style the page according to the body style. I can add different backgrounds to that page only, I can display a message to those who are logged in. It’s just convenient.

Do it.

Tip 4 – I’ll decide what goes on the top right!

Theme developers, create a widget area for the top right of the header (that’s why I love Genesis). I mean really, maybe I don’t want to always show a search bar there, or social icons, or any other mundane thing that I didn’t add.

Maybe I’d like to add a phone number, or a neat little graphic. You should allow the user to have control over that area.

Do it.

Tip 5 – If Statements, use ’em.

Make your footer widgets collapsible. It may not be the easiest thing, but figure it out. It’s annoying when someone adds footer widgets and styles the wrapper with a background color, width and height.

That leaves me with is a giant colored bar across the bottom of the screen that I now have to code out.

Stop it.

[sws_divider_line]

I’m sure there are many other tips out there that theme developers can do. But if you are a theme developer and you sell your themes as templates for people to use, don’t make it more work to fix then to actually use.

Oh Yes, and that leads me to the last and final tip.

Always double check your work!

Advertisement
About the Author

What’s UP! This is my site, I write 99% of the articles on here. I’m also the owner of SureFireWebServices.com. I help out a lot of developers and designers getting into the web game. Helping is fun for me, so feel free to ask me any questions! I’ve made courses and have a membership as well to help get you on your feet!

0 comments on 5 tips every theme developer should abide by…Forever

  1. theR3AP3R says:

    Amazing how these tips are so basic, yet so many designers/developers fail to follow them!

    Great stuff!

  2. Ben Hunt says:

    Excellent post Jonathan!

  3. Love it! I complain all the time about this. Especially the !important, and even worse when it is in a separate css file added and then linked by someone just doing piecemeal work on a project. I suppose it suits the purpose but if you call yourself a professional, and demand high rates then just act like on and not trip up the next guy.

    The body class snippet is huge, I do a lot of front end work and oddly enough…have had to add it back into the theme, my best guess is that theme developers remove it, refresh the page and figure “meh see it is useless” I have not come across a need to remove that snippet, yet I have come across the need to add it back…

    In the case of a custom theme maybe the body class was never built in – quick fix, and easy to spot…still kinda amateurish to leave it out and limit others.

    1. Jonathan says:

      =) This is why I moved over to the Genesis Framework, it just makes life SO much easier!

  4. that is why I moved over to the Genesis Framework, it just makes existence a lot less complicated!

    1. Jonathan Perez says:

      Absolutely, couldn’t agree more! 🙂

Leave a Reply

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

Scroll to top