New Theme Directory

The update to the WordPress Theme Directory from ten days ago marks the first time since its inception in 2008 that it has seen a major overhaul. The work on it is not done, but I want to take a few minutes and outline the objectives, what we gained from the update, and what still needs some work in the future.

The Goals

The WordPress.org infrastructure is almost as old as WordPress itself, with lots of interdependencies, running a mix of GlotPress, an old version of bbPress, BuddyPress, and WordPress. Since the Theme Directory was still based on bbPress, one the main goal was obviously to have it use WordPress. It was also in dire need of a design refresh and improvements to its search-ability.

The Gains

The Directory is now finally running on WordPress! It’s part of the WordPress.org multisite network and reaping all the benefits that come with that. With the move to WordPress and the resulting data format change, the theme downloader was also rewritten, along with the info and update check endpoints of the Themes API, and the script that syncs theme review results. User profiles and theme ratings also saw a small update.

For the first time, the Directory is now open source and the theme and plugin that do the heavy listing can be viewed, checked out, and contributed to on meta trac and svn!

Front-end

The front-end is largely based on @matveb‘s work on THX and the theme installer, which results in a now consistent user experience between WordPress’ admin interface and the Directory. It also lets us take advantage of those super fast searches and front-end query caches that we have come accustomed to. The move also came with free improvements to the tag filter (tag permalinks!) and introduced author “archives”. THX was built for the backend, so there were some adjustments needed to make all pages search engine accessible and to make URLs then also consistently work between the server and JavaScript side.

The pages from the left hand navigation were drastically simplified and merged, leaving us only with preamble page to the uploader, the uploader itself, and the page of commercial theme shops.

Commercial Theme Shops

Theme shops used to be a multidimensional array where each change meant a code change that had to be committed. They finally became a Custom Post Type of their own, vastly simplifying their administration. If you look at their page, you’ll also notice that it reuses the regular theme UI, nicely making them blend in with the rest of the Directory.

Needs more work

We wanted to get the new Directory into the hands of users as fast as responsibly possible, but that doesn’t mean that it’s finished or doesn’t need any more work. On the admin side a custom post status for suspended themes will be added, as well as a custom view for themes that have new version pending. Eventually there will probably also be a simpler way to approve new versions and set them live from wp-admin. On the front-end the JS and CSS files that power most of the Directory will be merged, removing the direct THX dependency that we currently have (it already broke parts of the directory during beta), and also removing two file requests on a page load.

The #1 feature request for the Theme Directory is probably multi-author support. With the move, this is going to be infinitely easier to achieve and will also be available shortly. This should also make it possible to change authors on a theme without too much overhead.

Finally, the Directory is meant to also be made available to rosetta sites. The theme and plugin are fully localized and already translated in a good amount of languages, it’s down to figuring out how we can integrate that site of the WordPress.org network with localized subdomains.

#theme-directory