Ten Tips for Becoming a Better WordPress Developer

By / Nov 5, 2009 / Tips
shares

It’s no secret that here at Web Design Ledger, we love WordPress. It’s what powers this website as well as inspires the content we publish on a regular basis. We’ve discussed WordPress numerous times before on the site and today we’re going to cover some of the things you can do to become a better WordPress developer.

I am going to cover a little bit from across the board as to what we can do to become WordPress developers. Some items take only a minute or two to complete while others might take a bit more initial effort. I promise though that through it all, we’ll get our development skills to a much higher level. The list does not go in order of importance, but I would say that all 10 of the tips could each be #1.

1. Build your own theme options panel for easier customization

If you’re watching the trends of premium WordPress themes, you’ll notice the growing trend of theme options panels. Everybody wants them and everyone (in my opinion) honestly needs them. They’re popping up in paid themes, custom themes and free themes, and for a good reason – they’re highly useful.

wordpress tips

A theme options panel can give yourself (or your clients) the added benefit of being able to change a host of things on the WordPress theme without ever touching any codes. With items such as advertisement blocks, carousel boxes, newsletter & rss boxes and much more being required for a majority of theme developments today, a theme options panel is something that every theme developer should know how to create. You can read up on how to create your own WordPress theme options panels here.

2. Understanding short codes can go a long way

Short codes are another item that can make your theme that much more special in the hands of the end user because of it’s ease of use. Short codes are a simple alternative to adding tricky codes to a post/page over and over again. Giving your themes user the ease of use can ensure that you’ll be the person they go to for future work.

Creating a short code is easy. Simply open up your theme’s functions.php file and add the following code to it.


function wdl() {
     return 'Web Design Ledger rules!';
}
add_shortcode('wdlrules', 'wdl');

With the above saved in your theme’s functions.php file, you can now add your shortcode to any post/page on your WordPress powered website. Simply add [wdlrules] to your post and it will return the text “Web Design Ledger rules!”

To learn more about the custom things you can do with WordPress shortcodes, you can check out the following article from smashing magazine.

3. Mastering WordPress conditional statements

Conditional statements in your WordPress theme can really take your website from the feeling of normal blog to the feeling of holy crap how did they just do that! And the beauty of it is that with a little bit of know-how and a little bit of code hacking, you can achieve this effect. The base of conditional elements is rooted in basic php codes, so if you’re aware of php at all, you’re one step ahead of the curve. If not, don’t worry because it’s simple to pick up.

For instance, if you’re wanting to display a welcome box on your websites home page and nowhere else, the following code will take care of that.


if (is_home()) {
     echo 'YOUR WELCOME BOX CODES HERE';
} else { }

You can notice the basics of the code above as well as see how I added in the “else{}” piece, which can help you along the way if you’re wanting to even customize the theme further. Checking out this article by Web Design Wall will help you dive deep into the world of conditional elements and what they can do for you.

4. Streamline your development for faster results

If you could cut your theme development time in half, would you do it? If you’re sane, I am going to assume that you said yes. Well, it’s pretty simple to streamline your development and allow you to tackle more jobs in less time. The first thing you should make sure you’re well aware of are dummy posts. You can download dummy posts that someone else created (I released a dummy post file on WP Guerrilla recently) or you can take a few minutes to create one that fits your needs a bit better.

The idea of creating your own dummy posts is that you’re able to instantly load the file into WordPress and have all of the posts/pages/categories that you need within 20 seconds or so. First, you’re going to create everything in your WordPress test install (categories, posts, pages, ect) and then head over to your WordPress admin page and click the “EXPORT” link under your TOOLS sidebar. Export your posts. Now, any time you want to load those posts onto a new test WordPress install, you can do so by going to IMPORT under the same TOOLS sidebar section.

wordpress tips

Another idea would be to create your own theme framework. Theme frameworks like Thematic, Thesis, WP Framework, Guerrilla Theme and many others help developers have a solid base to start from when building custom WordPress themes. I can personally attest to the fact that a theme framework has saved me hundreds of hours in the past few months alone. You can also build your own custom theme framework if you notice that you’re using the same items (header, nav, footer, sidebar, post wraps, ect) to save your time and also allow you to customize it easier.

5. Create theme specific widgets for easier use

Along the lines of the first tip I gave above, creating a theme specific WordPress widget can help allow your themes user more easily customize the look and feel of the theme. By giving different options like ad block widgets, related post widgets or various other widget blocks, your themes user can customize and rearrange the sidebars and other areas of your theme with ease.

wordpress tips

For more information on how you can write your own WordPress widget, Justin Tadlock wrote up an awesome article on the subject.

6. The little things can really go a long way

When you’re building a theme for any reason, the little extras you put into it to polish it off will set it apart from some of the sloppy work out there that is clogging the web waves. Standing out by going the extra mile is a piece of cake when you follow the couple of items below and add them into your releases.

Can you think of other little items to add into your themes that will help set your work apart from everyone else’s?

7. Use php codes instead of plugins as much as possible

Doing this quick little trick not only saves the end user time from having to download/install plugins, it also gives you some extra added know-how for future work – which is what we’re after here right; becoming better WordPress developers?

Above I linked to an article that tells you how to show related posts in WordPress without using a plugin, but what about other items? What about if we wanted to show the tweet meme button without a plugin? Copy/paste the code below into your theme where you want the button to show and style the div accordingly, giving it float, margin, border, etc.


<script type="text/javascript">
     tweetmeme_source = 'webdesignledger';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"> </script>

Starting to use your imagination, I am sure you can decipher a few other plugins and stick codes straight into your theme’s files -anything from the share this post boxes to the WordPress page navi codes and more.

8. Learn how to make WordPress as lean and mean as possible

The speed of your blog can be quickly bogged down by excess script files and codes that plugins and third part scripts create (like the tweet meme buttons, digg this buttons, facebook fan page boxes, ect). By simply applying a plugin or two to your theme and changing a few lines of code in a couple of files, you can turn your WordPress theme into a lean, mean, fast loading machine.

The first plugin I think that every blog should utilize is the wp super cache plugin. The plugin turns your dynamic pages into static html pages that it serves to your visitors which decreases load times significantly. Another plugin would be the Optimize DB plugin by Joost De Valk which does just what the name says – optimizes your database. For more hacks and tips on how to speed your blog up, WP Beginner has an awesome article on it.

9. WordPress hacks can be your #1 friend

WordPress is great for the blogging community. But with the right amount of hacks and adjustments, WordPress can be great for the web community as well. Turning your WordPress website into a CMS can be done with a few simple plugins. Below is a simple hack that will help reduce spam by disabling the ability to leave comments on your blog for anyone who comes to your blog with a NO REFERRER result (spam bots, ect).


function check_referrer() {
    if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == "") {
        wp_die( __('Please enable referrers in your browser, or, if you\'re a spammer, bugger off!') );
    }
}
add_action('check_comment_flood', 'check_referrer');

Smashing Magazine has a list of other great WordPress hacks you can read:

10. Keep up with the latest WordPress developments

One of the most important things you can do as a WordPress developer is keep up with the industry you are a part of. If you’re unaware that WordPress 2.9 is going to be released very soon, or unaware that there were some vulnerabilities in WordPress 2.8.4 and that is why they released 2.8.5, I would suggest checking in on some of the WordPress development blogs. Below are a list of a few of my favorite, which can not only keep you up to date on security and WordPress releases but also give you valuable tips, tricks and hacks for WordPress.

wordpress tips

So what about you? Do you have any tips or tricks that the other readers here on Web Design Ledger can learn from? If so, drop them in the comments. I’m always up to learn some new tricks, and I hope you learned some in this article as well.

26 Comments

  1. Lam Nguyen
    November 5, 2009

    Thanks for mentioning my post here, Mike!

    Reply
  2. Amber Weinberg
    November 5, 2009

    Perfect timing! I just started developing themes to sell on Themeforest and the knowledge I’ve gained from the past two days of work has trumped year of WordPress experience. Themeing gets really difficult when it needs to be packaged and moved vs. coding it straight to a clients server. Things like plugims have to be as minimized as possible while making sure everything you code takes the least amount of instructions and installation as possible.

    Reply
  3. Nikunj Tamboli
    November 5, 2009

    Great Article for a newbie like me in wordpress. Thanks for sharing

    Reply
  4. Angie Bowen
    November 5, 2009

    Fabulous article Mike! I really appreciate the link for creating a theme options panel. That’s something I’d like to learn to do soon.

    As for dummy content, I’ve tried a few different premades but have found that usually, I need to create custom content to fit the design I’m working on. The premades are a good place to start though, especially for the various post elements included. I haven’t tried yours yet, I’ll have to give it a shot :)

    Reply
  5. Syed Balkhi
    November 5, 2009

    A great article for WordPress developers. We are honored to be among one of the resources.

    -WPBeginner

    Reply
  6. paul
    November 5, 2009

    great post, I will use as a reference.
    Theme options panels are really cool and something I’ve been wanting to learn to do.
    here are a few more resources:
    http://www.catswhocode.com/blog/how-to-make-a-control-panel-for-your-wordpress-theme
    http://wpshout.com/create-an-awesome-wordpress-theme-options-page-part-1/
    http://forthelose.org/how-to-create-a-theme-options-page-for-your-wordpress-theme

    I would also add:
    branding the login page
    harden the security
    auto resize image thumbnails
    adding and removing javascript and css files the correct way with wp_enqueue_script, etc.

    Reply
  7. designfollow
    November 5, 2009

    thanks for this great post

    Reply
  8. Emil Lukov
    November 5, 2009

    WP Beginner doesn’t deserve to be featured on WDL. This “blog” is just plagiarism from WpRecipes, Smahing Magazine and a few others.

    Instead you should check out talented and original WordPress developers Ian Steward and Nathan Rice (among others)

    Reply
  9. seethemes
    November 5, 2009

    yeah..nice article and good tips for use wordpress..thanks http://www.webdesignledger.com

    Reply
  10. Tim Rombach
    November 5, 2009

    That’s really true!

    Reply
  11. Matthew Simmons
    November 5, 2009

    Great post!

    I’ve just recently started getting into wordpress. It can be frustrating, but I’m already starting to work out the kinks.

    Reply
  12. Daniel H
    November 5, 2009

    I’ve posted some tips for setting up WordPress locally for development that might be useful for developers.

    5 Steps for WordPress Preparation

    Reply
  13. Web Development Kolkata
    November 6, 2009

    Very informative post and thanks for the links you have posted in the post.

    Reply
  14. Mike Smith
    November 6, 2009

    Thanks for the comments everyone. Glad the article was found useful.

    Reply
  15. Luis Miguel
    November 6, 2009

    Very interesant!! Very useful.

    Reply
  16. Cristian
    November 6, 2009

    Very insightful list! I especially agree with number one, as including an options panel is a growing trend in WP theme development. Overall very useful links. Thanks!

    Reply
  17. Francisco Matelli
    November 9, 2009

    Just thanks! Everything in this post is very good!

    Francisco Matelli,
    :)

    Reply
  18. Shelby
    November 9, 2009

    Great set of links for anyone working with WP.

    Reply
  19. Dalesh Kowlesar
    November 10, 2009

    The idea of cutting my WP developments in half is awesome. Am going to try it right away. Thanks!

    Reply
  20. sandesh
    November 11, 2009

    nice, Some are really helpful.

    Reply
  21. J. Hendrix
    November 21, 2009

    Great article. I recently started writing my own templates. Planning to sell them om themeforest.net.

    Reply
  22. Eko Setiawan
    February 9, 2010

    I just read this article…this great resource for me. I try to be a good wordpress developer.
    Thanks…

    Reply
  23. Weby Life
    March 4, 2010

    Great Post Was searching for things related to point 8 it is definitely gone help

    Reply
  24. Amazon Plugin
    June 8, 2010

    It is incredible how several persons do not understand this. Thank you for this extremely informative write-up, and I appear forward to seeing far more within the around long term!

    Reply
  25. Sandor
    November 7, 2011

    Good article for beginner wordpress developers.

    “WordPress hacks can be your #1 friend”, but it’s not recommanded, because after some core updates your application will die.

    Reply
  26. DRG
    December 25, 2012

    Will check all these , thanks for the share mate :)

    Reply

Leave a Reply