WordPress 3.9 will be released this month with some great new features. I think the enhancements for media (drop-in image uploading, audio/video playlists, and better editing options) will get a lot of attention in this release- but there’s also a ton of hidden gems.
I went through 582 tickets and picked some of my favorite enhancements, focusing on the ones I think will be most interesting for theme developers.
The custom header feature allows the user to set the color of the header text. But what if you’d like for the site title to be a different color than the site tagline? This is an issue I just hit in the GovPress theme I’ve been working on. Read more →
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.
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. Read more →
In the latest version of Portfolio Press I decided to move all the custom page templates into their own “templates” directory. This helps to organize the files better and simplifies the directory. However, I also needed to build an update routine for existing users who had the page templates set at the previous paths
To do that, I needed to query for all pages that had a page template set, check if matched one of my existing templates, and then update it to the new path. Here’s the code snippet in case it is useful to anyone else. Read more →
I think it makes a lot of sense to display certain post format archives differently than standard post archives. For instance, image post formats might look a lot better in a grid view with large images rather than a traditional blog format.
It’s easy enough to alter the post format archive template, but the taxonomy views (categories and tags) will still display in the standard layout- even if all the posts are the same format.
I thought it would be great to detect what type of posts were being displayed in the taxonomy before they rendered, and use a different layout if they were all in the same post format. This way I could continuity between the post format archives and taxonomy archives- assuming they all contained the same post format. Read more →
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.
Browser testing in Internet Explorer can be a bit tricky since I do all my WordPress development work on a Mac- but I finally got a setup that works well.
I’m using Virtual Box because it is free, rather easy to set up, and I could store all the disk images on an external drive (they take up too much space on my MacBook Air, 10GB a piece).
The disk images with Windows and Internet Explorer can be downloaded from Modern IE. I had to download some of the rar files multiple times because the zips were corrupted in the download (they’re large files)- but I eventually got a clean version. Disk images are available for IE6, IE7, IE8, IE9, IE10 and IE11. Read more →
Portfolio Press has always used custom post types to display portfolio content. When the theme was released in 2010 this was a novel way to do it (custom post types had just been released in WordPress 3.0).
Post types allowed the portfolio to be styled differently, use different templates, and keep portfolio content separate from standard content. In the dark ages before WordPress 3.0, developers had only achieved this by requiring users to post in a pre-defined category or tag.
But since WordPress 3.4 we’ve had post formats like “gallery” and “image” which are now supported by most new themes. With the latest version of Portfolio Press, I wanted users to be able to choose which to use. Post formats are the new default, but users can install the Portfolio Post Type plugin and use post types instead if they choose.
To save a lot of duplication in template code and styling, I used a bit of template hijacking and a few other useful styling tricks. I doubt anyone is working on this exact same issue, but I think some of the ideas might be useful for other applications. Read more →
The core WordPress mission is to democratize publishing through open source. But I believe we can also make our government and institutions more democratic by publishing with open source. That’s why I started contributing to a free WordPress theme for city government.
Most current WordPress themes support featured images. But, let’s say you’re updating a site that uses a theme built before WordPress 3.0. And let’s say that theme uses a custom meta field to define the featured images. And let’s say there’s over 900 posts on the site. There’s no way you’d want to set all those featured images manually.