The Future of Underscores and A New Committer

The title may strike you as a bit ominous, but fear not. Underscores, our popular starter theme for WordPress theme development, isn’t going anywhere. As we continue to push for consistency in themes and imagine what they might become with Gutenberg, we’re bringing our attention back to Underscores. 🚀

For the last year and a half, we’ve experimented with a new starter-theme generator called Components. It was a way to make a few different theme “types” comprised of different components. The starter themes born from it brought with them more code and styles, and gave theme authors a bigger head start in their work. The generator we built to piece the different components together got complex quickly, though. We created a plugin to test builds locally and struggled with a seamless way to make many starter themes from one code base.

We learned a lot, though. We worked on Components at two team meetups, made almost 900 commits to the project and launched dozens of themes with it. However, we hit a point where we realized we had over-engineered parts of the project. The original idea is still solid: make starter themes do more by crafting them out of building blocks. But we didn’t hit the mark, so we’re retiring Components, and looking to bring some of what we learned there to Underscores.

In the last year, we’ve gotten a lot of questions from the community about Underscores and whether we had abandoned it. No way! It’s a stable project, and we enjoyed working on something new, away from it. It gave us better perspective and more ideas for the future of Underscores.

We also know that involvement from the community is vital. It’s been a while since we added our first contributor external to Automattic. To that end, we’ve given long-time Underscores contributor Ulrich Pogson commit access. He’s also a contributor to WordPress, most frequently as a member of the Theme Review Team. We’re excited to have his expertise and passion for world-class themes as part of the project. Please join me in welcoming Ulrich! 🎉

It’s always hard to let go of a project, in this case, Components. But it shouldn’t be, when you walk away with more knowledge than before. It has us excited and reinvigorated about Underscores and its role in the future of theming. And we’re glad Ulrich will help us along the way!

Introducing Components: A Toolbox for WordPress Theme Development

Meet Components, a starter-theme generator to speed up WordPress theme development.

We love a good starter theme. Since launching Toolbox and its popular successor, Underscores, we’ve always reached for a starter theme when building our next, awesome WordPress theme to get us off on the right foot. With Underscores, we always say it gives you a 1,000-hour start. We get excited when we see someone fork Underscores and make it their own, so it shouldn’t come as a surprise that we’re obsessed with evolving what we think of as a starter theme.

Continuing that journey, we’re pleased to announce Components. Think of it as a toolbox for taking your themes where you want them to go, faster. Forked from Underscores, Components gives you a solid base to work from – but it also takes the starter theme to the next level, offering a choice between five different theme types. Each one adds the code needed for starting a certain type of theme. You can select from:

The Classic Blog

  • A two-column layout
  • A sidebar with widgets
  • Navigation in the header
  • A fixed maximum width of 1120px in your style.css file

The Modern Blog

  • A single-column layout
  • A sliding panel for navigation, social menu, and also widgets
  • A large featured image with full-width script

Portfolio

  • A portfolio post type, courtesy of Jetpack, added to all the necessary files
  • A grid portfolio view
  • A single column blog template
  • A sliding panel for navigation, social menu, and also widgets
  • A large featured image with full-width script

Magazine

  • A front page template with featured images in grid a layout, plus a two-column blog
  • Layout with excerpts
  • A two-column layout
  • A sidebar with widgets
  • Navigation in the header
  • A fixed maximum width of 1120px in your style.css file

Business

  • A front-page template with a custom header, testimonials section, and  page content area
  • A custom testimonial post type turned on, courtesy of Jetpack
  • A two-column layout
  • A sidebar with widgets
  • Navigation in the header
  • A fixed maximum width of 1120px in your style.css file

Why Components?

So why the different approach with Components? Three main things inspired this direction: the community behind Underscores, the people who use our themes every day, and the web design and development community.

While maintaining and improving Underscores, we always see great pull requests from the community that we turn away because the contributions end up being too specific for a normal starter theme. Many of those additions would have been perfect in most themes. Now, some of them have a home in a project that zeroes in on a certain kind of user with each theme it builds. Speaking of users, we know from launching hundreds of themes on WordPress.com that themes are one of the most challenging areas of WordPress for people to understand. They need more themes that “just work,” and we hope Components will help achieve that. Lastly, the web community has embraced building systems, methodically created with the pieces that make up a site. Even some popular libraries have taken this approach. We see Components as the first step to allowing you to make a starter theme that’s just right for your project.

We’re very excited to see what the community brings to the project and are looking forward to evolving Components with your help. Right now, we’re in the early stages of our vision and execution for Components, so expect both repositories that power this project, theme-components and components.underscores.me to evolve quickly and constantly.

Fork or download Components on GitHub or generate your own custom starter theme at components.underscores.me and have fun making awesome new WordPress themes!

Sass comes to _s

I’m pleased to announce that you can now get Sass rolled into _s by simply checking the box on Underscores.me. The community has driven this change through pull requests and forks.

It’s taken a little while, but we wanted to do it right. As with the rest of Underscores, we wanted to keep it as simple as possible, offering any extra scripting with a checkbox option rather than imposing it on all developers. Not everyone compiles or uses Sass the same, so _s shouldn’t force anyone to follow one path or another. In this sense, the Sass provided takes a pure approach, not requiring Compass or any other scripts.

Worth noting along with this addition is that the Github version of _s is now purely for development. We strongly recommend only using Underscores.me to download _s, going forward.

Just like with _s itself, the Sass it uses will probably change and evolve with time. What is in place now is a structure, a starting point. Any issues, or requests can be posted on Github, and you can even roll your own using a fork. Just like _s is your theme’s starting point, you can take the Sass in any direction you want.

I hope you are excited as I am to see Sass in _s! I’d like to thank the following people – without them this would not have been possible. As this was a Github project, here are their Github usernames: @gregrickaby @bradp @hugobaeta @obenland @sabreuse @MichaelArestad @jacklenox and myself. I look forward to seeing what things people build and where they take Sass in _s.

Granting Commit Access to Underscores

With Underscores’ growing popularity and continuing maturation as an open source project, we decided to take the next step and open up commit access to contributors outside of Automattic. Please join me in congratulating Philip Arthur Moore on becoming the first external committer to an Automattic project on GitHub.

Philip has been a fairly easy choice as we obviously know him well here at Automattic. He was with us for over three years and a driving factor in everything theme related during his time with us. But more importantly, he continues to care about Underscores and contribute in discussions and patches, and we know about his theme development skills and passion for world class themes.

We’re much more conservative with our Underscores goals and dreams than most people wanting to contribute, so it is important to us that committers share these values and understand where we see the project headed. We have no doubt that that is the case with Philip, who helped shaping Underscores from the day it started. Andrew Nacin recently published a post about how the WordPress project chooses committers, and while WordPress and Underscores are vastly different open source projects, there is still a lot to take away from it—especially around the qualities of a great contributor—that also applies to this project.

Underscores just recently celebrated its second birthday. It has become an integral part of many projects, not only at Automattic, but for theme developers all over the world. So we’re exited to have Philip back in a leading role and continue this journey with us!

HTML5 Galleries in WordPress 3.9

With the new release of WordPress will come the ability to declare support for HTML5 markup in galleries. Once a theme declared support, the definition list elements will be replaced by <figure> and <figcaption> for better semantics.

If you decide to not only adopt this new feature but also maintain backwards compatibility, then there are two ways to achieve that:

  1. Style not only the new HTML5 elements, but also add CSS selectors for the traditional definition list elements. This is the route we chose for _s to keep it as simple as possible.
  2. Filter the shortcode attributes and override the tag parameters. Since the shortcode_atts_gallery filter was introduced in 3.6, you’ll be backwards compatible with the latest two versions.

Continue reading “HTML5 Galleries in WordPress 3.9”

Don’t Update Your Theme (From _s)

I recently attended Steve Zehngut’s session on Underscores at WordCamp Los Angeles, where I was surprised to learn that a lot of developers are unsure how to update their themes with the changes we make on _s.

Version-less _s

For that we decided to make _s version-less, to prevent the feeling you need to update your _s-based themes with these constant changes. With no real roadmap, previously we bumped the version number arbitrarily whenever we felt like it, with a big enough change. Continue reading “Don’t Update Your Theme (From _s)”

_s Version 1.3 Ready For Download

I’m happy to announce that _s 1.3 is ready for download on both Underscores.me and GitHub. The most notable changes introduced during the last two versions are basic support for Infinite Scroll, theme customizer integration, and additional Post Formats.

There was no blog post published for _s 1.2, so consider the following notes to be a brief overview of fixes and enhancements performed on _s since version 1.1:

Version 1.3:

– Basic support for Infinite Scroll (ref.)
– Add additional Post Formats into functions.php (ref.)
– Provide context for comments title strings (ref.)

The following files changed from Version 1.2 to Version 1.3:

404.php
README.md
comments.php
functions.php
image.php
inc/jetpack.php
inc/template-tags.php
style.css

You can also run the following command in Terminal to see a log of file changes between Version 1.2 and Version 1.3:

git diff --name-only 7b7489 f1e9b4

For a full log, visit the commit history page on GitHub.

Version 1.2:

– Theme customizer integration (ref.)
– Add folder into theme for translations and additional instructions into the readme.md file (ref.)

The following files changed from Version 1.1 to Version 1.2:

404.php
README.md
archive.php
comments.php
content-single.php
content.php
footer.php
functions.php
header.php
image.php
inc/custom-header.php
inc/customizer.php
inc/extras.php
inc/jetpack.php
inc/template-tags.php
inc/theme-options/theme-options.php
inc/tweaks.php
index.php
js/customizer.js
js/html5.js
languages/readme.txt
layouts/content-sidebar-sidebar.css
layouts/content-sidebar.css
layouts/sidebar-content-sidebar.css
layouts/sidebar-content.css
layouts/sidebar-sidebar-content.css
no-results.php
page.php
readme.txt
search.php
searchform.php
single.php
style.css

You can also run the following command in Terminal to see a log of file changes between Version 1.1 and Version 1.2:

git diff --name-only f1e9b4 175ef5

For a full _s commit log, visit the commit history page on GitHub.

There are open issues that we’d like to revisit for _s 1.4, namely post format archive labeling (ref.) and a load of other Open Issues.

Please jump into the ongoing discussions on GitHub and if there’s an issue with _s that has not been raised yet, feel free to open it up.

Underscores.me — The Best Way To Get Started With The _s Theme

Back in February we introduced you to _s, or Underscores, the WordPress starter theme we use at Automattic to build the majority of our themes (and even when we’re not building themes from it we’re referring to it). It’s come a long way since then with a steady stream of refinements. But one thing about it has always been … less than refined. To fork _s you’d have to do a, well, OK, kind of annoying search and replace routine that could easily trip people up if they did it wrong. Thanks to the efforts of Hugo Baeta and Konstantin Kovshenin that isn’t the case anymore. And they’ve done away with that problem with incredible style. Themers, check out Underscores.me:

You can now download your own version of _s with your own custom theme name — the search and replace is all done for you. All you have to do is theme. Plus, you can see all the beautiful people who have contributed to your favorite WordPress starter theme. Look at them all! Community theme development, FTW.

So, what are you waiting for? Get over to Underscores.me and start developing that awesome theme. We can’t wait to see it.

Getting Started With the _s Theme

There are some simple instructions in the theme readme.txt on how to get started with our new starter theme, _s, but, to be honest, I’m not exactly the most reliable readme reader myself so here are those instructions with a bit more explanation. 🙂

The first thing you want to do is copy the _s directory and change the name to something else. Like, say, megatherium.

Then you’ll need to do a three-step find and replace with your favorite text editor on the _s name in all the templates.

Continue reading “Getting Started With the _s Theme”