Writr — a minimalist, content-oriented tumblelog theme developed exclusively for WordPress.com — is now available in the official WordPress Themes Directory.
Nathan Ford wrote a great article about how you can use the attribute selector to define styles for a multitude of classes that share a common element. Initially I thought this was great (I actually still think this is a great idea), and used it in
_s and Twenty Thirteen to simplify the clearfix selector and some others. We used
[class*="content"], to grab all classes that contained those two words, essentially addressing our entire page structure with two selectors. Awesome, right?
Well, it turns out there are a few issues with this approach. After a while we received a report that Modernizr uses a
generatedcontent class on the html element, screwing with the rest of the site because the styles for the
[class*="content"] selector were applied. We also received reports from WordPress.com, where users specified tags, categories, or post titles that contained one of our two words. Since WordPress adds all categories and tags as classes in
post_class(), this, again, broke the site’s layout.
I still think this a valid approach in projects where you can control the class namespace. Since you can’t really do that in WordPress, it’s not a good approach for theme developers.
There was an interesting bug reported for Twenty Twelve recently: The
.single-attachment body class only gets applied when the attachment’s parent is a post (or custom post type). If the attachment’s parent happens to be a page, that class is missing.
In case you have been using
.single-attachment to specify styles for the image attachment page, make sure to test your theme with images that have a page as a parent. And use the
.attachment body class in the future.
_s, I came across an issue asking if we could remove the loop syntax in singular templates since there is never more than one post. I asked for Michael Field‘s opinion on the matter and he pointed me to a core ticket for Twenty Eleven about the same issue. Continue reading
Ryu is now available in the official WordPress Themes Directory! It’s a clutter-free theme that is perfect for personal bloggers.
Next Saturday — a bold and playful theme that adds a touch of childlike innocence to your blog – is now available in the official WordPress Themes Directory. It was originally designed by Ian Mintz and brought to WordPress by the Automattic Theme Team.
Sundance — a brand new free video theme brought to you by the team here at Automattic is now available in the official WordPress Themes Directory.
There are a couple of spots that I always keep handy when looking for information about WordPress’ query handling. Consider this Gist an addition to my list:
Fun fact of the day: about 37% of WordPress downloads are for non-English, localized versions.
So as a plugin or theme author, you should be thinking of localization and internationalization (L10N and I18N) as pretty much a fact of life by this point.
An excellent post from Otto on improvements to make and pitfalls to look out for when performing i18n on your WordPress theme.