The Underscores theme for WordPress developers

Just because you’re not a ninja WordPress developer doesn’t mean that you’ll never have the need to make your WordPress blog look a certain way … a way that no existing theme duplicates.

If you are like me, taking a comprehensive and well thought-out theme such as TwentyFourteen means hours of trying to figure out where to make changes, and then how to effect those changes. There’s so much built into most of the complete themes that reverse-engineering them takes as much time as implementing your own look and feel.

Enter the _s theme, AKA Underscores. Underscores is brought to you by Automattic, the people behind WordPress, and is created to offer designers what they call a 1000-hour head start on developing a WordPress theme that’s all you. It includes:

  • A just right amount of lean, well-commented, modern, HTML5 templates.
  • A helpful 404 template.
  • A optional sample custom header implementation in inc/custom-header.php
  • Custom template tags in inc/template-tags.php that keep your templates clean and neat and prevent code duplication.
  • Some small tweaks in /inc/extras.php that can improve your theming experience.
  • A script at js/navigation.js that makes your menu a toggled dropdown on small screens (like your phone), ready for CSS artistry.
  • 2 sample CSS layouts in /layouts: A sidebar on the right side of your content and a sidebar on the left side of your content.
  • Smartly organized starter CSS in style.css that will help you to quickly get your design off the ground.
  • The GPL license in license.txt. Use it to make something cool.

Now normally, when you go to modify an existing WordPress theme, you have the existing theme installed, and then you create a “child theme” of that existing theme to reflect your modifications. This not only allows you to build on the existing code base, but it also gives you a parachute in case you go too far and need to return to the base code to get things working again.

Underscores is different. You can create a child theme if you want, but the typical use is to modify it as the parent theme. To do this, you go to Underscores, type in the name you wish to give your new theme, and Underscores creates all the files needed to get your theme started. You then modify these files to your heart’s content.

If you just load up your Underscores-based WordPress site, your first impression may be that something has broken, which is to say the appearance is very plain. Websites haven’t looked like this since the early 1990s. But, all the hooks are there for you to create your masterpiece. Load your own CSS and you’re off to the races.

What I like to do is open all the Underscores files as a “project” in BBEdit, my text editor of choice. This allows me to search (and replace, if desired) across the entire code base when making changes. Combined with using Bitnami Stack for WordPress running locally as a development platform, I can quickly and easily make changes and preview them using posts imported from one of my other WordPress sites.

One thought on “The Underscores theme for WordPress developers

Comments are closed.