A New Base Theme

The first WordPress theme I ever built was a modified version of Kubrick. I think that’s how most front end developers get started with WordPress- tweaking a core theme or a commercial theme to make it fit. Building one entirely from scratch has never made a lot of sense to me and over the years I’ve used a number of different theme platforms to build on.

History

toolbox-screenshot

I had a love affair with Thematic for a couple years. It was one of the early “frameworks” and a precursor to newer projects like Genesis. It was great if the design fit into the general structure of the theme, but I often found myself writing ten lines of code in order to unhook and rehook different sections of the theme for really minor changes. It was difficult to trace functions across multiple files. Although it made me a much better developer and was excellent for some projects, overall it seemed unnecessarily complex.

Next for me was “Toolbox“. This was a base theme developed by Ian Stewart, the same developer who had started Thematic. It was the complete opposite of a framework: a real simple theme, well structured, and easy to modify. It also followed the HTML5 spec (remember when that was new?!). I built my first publicly released theme (Portfolio Press) off of it as well as several projects for clients.

After Ian took a job with Automattic, Toolbox was forked and became Underscores. More on that over here. It’s an excellent base and many of the themes on WordPress.com are built off of it. There’s a great team of developers maintaining and contributing to Underscores. The code is clean, well commented, and the model of excellent WordPress practices.

Time to Fork

Fork

However, over the last few months I’ve found myself having to do more and more work to get Underscores to where I need it before embarking on a new project. I’ve decided it’s time to fork.

This is not a bad thing of course. Underscores is intended to be base in which to build off of, even if you’re forking it to build your own new base. And a solid base theme is important for any WordPress theme developer- it allows you to move quicker because you don’t need to solve the same problems for every project.

The main reason I’ve decided to fork Underscores is because of build tools. (Though re-using patterns for menus and comments will also be helpful.)

Continue reading

The Importance of Code Review

One of the huge benefits of working as a developer on a team is code review. You’ll commit changes for a project and then another developer will review them before pushing live. This helps avoid obvious mistakes and typos in the code- but it’s also one of the best ways to learn. Invariably your code can be better or more efficient, and having another developer look at your code will expose those gaps. Continue reading

Using Grunt with WordPress Themes

Over the last couple weeks I’ve started using Grunt with all my WordPress themes. It’s a development tool that helps automate certain tasks- like generating translation files, building sass files, adding browser prefixes, and minifying scripts.

Do you think we can automate some of this?
Do you think we can automate some of this?

A tool like CodeKit does many of the same tasks (and I highly recommend it if the command line terrifies you), but Grunt gives you more control and a huge library of modules to work with.

If you haven’t heard of Grunt yet, I think the place most people start is with Chris Coyier’s article “Grunt for People Who Think Things Like Grunt are Weird and Hard“. Continue reading

Portfolio Press & Portfolio+ Updates

There are a number of changes in this latest version of Portfolio Press and Portfolio+. I’m hoping the update will be seamless for most users, but there will be a few steps to complete once you upgrade.

portfolio-press-2-0

Page templates have been updated in this version, so if you have any page templates set (say for the portfolio on the home page), you may need to go to that page, re-select the template, and re-save. I wrote an update routine to do this but it won’t fire in all situations. So, just to be safe, give it a check and make the updates if needed.

Next, the theme should prompt you to change your posts per page settings in the reading options. I recommend 9. Previously, the theme had automatically controlled this, but people have often wanted to change the default (to 12 or 15). This now you gives you that control. It also fixes edge case paging bugs that some users experienced.

Finally, you’ll want to install the Regenerate Thumbnails plugin and generate new images. The theme should also prompt for this. There were a couple of image size changes in this update (especially if you had the one column layout selected)- and this will ensure that your images are at the proper size and should fix images that may have appeared blurry previously. Continue reading

Hiding Page Templates in the Admin

With the latest version of Portfolio Press I needed certain page templates to only be available if the Portfolio Post Type Plugin is installed. This is because those page templates work specifically with portfolio post types and are ineffective without the plugin.

Unfortunately there is no filter for page templates in core (though there are some patches). The PHP workarounds I’ve seen are convoluted and brittle, so I decided to tackle this instead with javascript. Continue reading

Options Framework Roadmap

The latest WordPress release (3.8) is scheduled for December 12th. For those following along with core you’re probably aware that this release will bring significant UI changes to the WordPress dashboard.

options-framework-1.7

The Options Framework handles this new dashboard design fairly well. Core styling classes were used as much as possible and styling is fairly minimal- so most of design changes are inherited. The biggest issue I saw with the current version is that checkboxes and radio buttons are a bit warped. Continue reading

WordPress Design Changes

There are some bold new changes in the works for the WordPress dashboard: a responsive design, a font icon set, and a new darker + flatter look. There’s also workflow changes on a number of admin screens, including the themes page and dashboard home.

New Dashboard

For folks interested in following along with the progress, check out the make.wordpress.org/ui blog. MP6 and Dashboard can also be installed on a development site to preview all the updates. Continue reading