However, WordPress still treats this as a page rather than archive, which can be problematic if you have specific styles or scripts that only load on archives or rely on certain body classes. So I started to experiment with a pre_get_posts function. I found this actually works quite well, even with pagination and infinite scrolling scripts. Continue reading Displaying a Custom Post Type Archive on the Front Page
WordPress 4.0 introduced a few new features for the customizer, including panels and input field types. This post on the Core Make blog explains the updates well- but since I was experimenting with it today I thought I’d post a few more examples.
I put together a code snippet that registers a custom panel, section, and then displays a few of the new field types: url, e-mail, password, textarea, date, and range. Arguably the only real useful ones are textarea and range as you’ll see in the notes below. Continue reading Customizer Panels and Field Types
If you’ve written a post on WordPress.com recently you may have noticed that Automattic is testing a new interface. It removes a lot of the the clutter of navigation bars and metaboxes, leaving writers to focus on the writing.
I thought it would be interesting to look at these numbers again to see how the independent theme market has changed over the year. I updated the ranking table and posted the new information at the bottom of this post.
Alexa data isn’t necessarily correct as it is based on traffic estimates. It also doesn’t indicate anything about actual revenue numbers. So the “data” here should definitely be looked at with skepticism. It is, however, one of the few independent measures we have to rank websites.
The biggest takeaway for me is that the Alexa ranking for all the top theme shops improved significantly. Every single shop in the top 25 is doing better than last year. I think this shows a continued interest in commercial themes and that well established shops are likely benefiting the most. Continue reading Theme Shop Directory (2014)
All WordPress themes check for updates on WordPress.org, regardless of whether it was developed custom for a client or built by a commercial theme shop. This can be a problem if a new theme gets added to WordPress.org that has the same name as your custom or commercial 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.
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
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.)
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 The Importance of Code Review
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.
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.
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. Continue reading Portfolio Press & Portfolio+ Updates
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.
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.
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.
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 Options Framework Roadmap