twentyfifteen theme

Tips for Beginner WordPress Developers

In this article I want to share some practical tips for beginner WordPress developers. Perhaps you’ve used WordPress for a long time but have never really tried your hand at custom theme development. Maybe you’ve explored some of the code, tweaked things from time to time, but never really developed anything yourself from scratch. Sometimes the hardest part is just knowing how to get started. I’d like to share some tips that I’ve learned that might speed up your process.

Get the tools you need.

Really only two things are needed to get started as a WordPress developer: a local copy of WordPress to test things out, and a code editor. Fortunately, both are free and easy to set up.

To get a local copy of WordPress running you need to grab a copy of WAMP (or MAMP if you’re on a Mac). WAMP and MAMP is a software package that installs all the basic ingredients of a web server. You install this locally on your computer and it cuts out the need to upload files to a live server on the internet. This really speeds up your work flow. WAMP contains everything WordPress needs to run, namely Apache, MySQL, and PHP. You install WAMP just like any other application. Download and run the install script. Once it’s installed and running (don’t forget to start it) anything inside the root folder (usually called www) will show up in the browser. Install WordPress in this directory and you’re ready to go.

wamp directory screenshot

To look at and edit WordPress code you need a good editor. I recommend Sublime Text. It’s free, small, and loads quickly. Go ahead a grab a copy of Sublime Text from their website.

Now you’re ready to start breaking, I mean editing, things.

Look at examples.

I’ve found that the best way to learn code is to look at code that works. In the case of WordPress I’ve found it really helpful to start with a fully functioning WordPress theme and examine the different parts. You can learn a lot about a theme just by looking at the files. Most themes come with a page.php file, a single.php file, and a sidebar.php file among others. If you want to make your own theme it’s probably a good idea to include these in yours as well. It’s also informative to look at what is NOT included. For example, the Twentyforteen theme contains a content-gallery file but the Twentyfifteen theme does not. What might that file be used for?

Observe. Ask questions. Tinker.

It’s also informative to compare code between two identical files. Every theme has a page.php file, but no two themes render a page the same way. There are many similarities between themes, but by looking at the differences in the code (and how pages are displayed in the browser) you will grow your knowledge of what’s possible. And if you get hung up on some certain syntax or don’t know what a certain function does make sure to look it up in the WordPress codex. The codex is a full guide to WordPress code and functions. Just paste your function name in the search box and read about it. The codex also contains good examples of how functions are used. Use these examples in addition to supplement what you see in your theme files.

The last thing I’d recommend is to get a base or starter theme and start implementing some of your own functionality. You can use something like Naked WordPress theme or the HTML5 Blank theme. These give you a basic responsive framework to get you started but very little else. These themes are well documented and are great for learning WordPress code. Add these to your collection of themes and start trying things out. Implement a new widget area. Create some custom menus. Have fun. The sky’s the limit!

In summary, get the tools you need, look at lots of code examples, and start coding things yourself in a base theme when you feel creative and adventurous. Give it a little time and you’ll be making cool things before you know it. Keep it simple and go for it!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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