Measuring Site Speed

Fast load times are incredibly important for website users. Unfortunately, it’s an overlooked feature on most WordPress sites.

Themes and plugins aren’t necessarily optimized for performance, and it can be difficult to determine how plugin and design choices affect the overall page speed.

But, if we start to measure it, we can start to optimize for it. When I do site performance audits for clients I primarily use two tools to evaluate page speed. The browser developer tools (Chrome) and the “Site Speed” report in Google Analytics.

Pingdom also offers a nice visual waterfall of page speed timings (similar to the “Network” tab in most browser developer tools), and Google Insights can give good general suggestions. Continue reading

Displaying a Custom Post Type Archive on the Front Page

Most developers use a custom page template if they need to display a custom post types on the front/home page. This is fairly easy to do using a new WP_QUERY:

$args = array(
	'post_type' => 'download',
);
$downloads = new WP_Query( $args );

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

Interview: Mike McAlister

I enjoy talking shop with other theme developers. A few months ago I was lucky enough to get a chance to interview Mike McAlister.

For those that don’t know Mike, he runs a little theme shop called Array.is and is an excellent designer and developer.

Designer, developer and decision maker. Enjoys details, whitespace, coffee, notebooks, vinyl records and pizza.
Designer, developer and decision maker. Enjoys details, whitespace, coffee, notebooks, vinyl records and pizza.

When Mike and I did the interview, he had just launched a rebranding of Array. We discussed the importance of good design, the economics of the theme business, and how he first got into building themes. Continue reading

Migrating to Digital Ocean

I’ve had a number of tiny WordPress sites on shared hosting (BlueHost) for over a decade. It’s been pretty great. Shared hosting has a lot of benefits: it’s cheap, it’s relatively easy to manage, e-mail is included, and there’s basic support.

The drawback is that servers aren’t generally optimized for WordPress performance, and once a site begins to scale in traffic you need to move it to a managed host or a VPS.

droplet-screen

I’ve been wanting to try DigitalOcean (one of the many cloud providers) because my hosting bills have been growing. I still have my basic shared hosting with BlueHost, but I also have large sites on WP Engine, and a VPS with WiredTree. They’ve all been great and have their own benefits, but the idea of consolidating into one provider and reducing my hosting bill significantly is a huge draw. Continue reading

Customizer Panels and Field Types

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.

new-controls

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

How to Install a Purchased Theme

When you purchase a WordPress theme you’ll generally get a download link for the zip file. To upload this theme to your site involves a couple simple steps.

  1. Log into your WordPress site, and go to “Appearances > Themes” menu item
  2. Click the “Add New” button at the top of the screen
  3. Click the “Upload Theme” button at the top of the screen
  4. Now choose the .zip file that you have of the theme click “Install Now”

Add New

add-new

Upload Theme

upload-theme

Overwriting a Theme

If you are uploading a newer version of an existing theme, you will likely get this message:

“Destination folder already exists. Theme install failed.”

In that case, you will need to temporarily switch themes (perhaps to the default). Find the theme you want to replace, click “Theme Details” and then click “Delete”. Now you can upload the newer version.

Additional Notes

  • If you use WordPress.com, you cannot upload your own themes.
  • If your zip file contains multiple themes, you’ll need to unzip it, and then re-zip each theme individually.
  • Purchase themes only from trusted sources- otherwise you run the risk of getting a hacked version (no fun).

Interface Experiments

wordpress-com

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.

Besides the visual changes, it appears the interface is powered completely by javascript. Publishing new posts and updating meta doesn’t require a new page load like the current version of WordPress core does. The updates are done through a JSON API, which is one of the exciting features slated for core in WordPress 4.1. Continue reading