December Sale! Save up to 50% now.

Twenty Twelve: Live demo

By team on July 6, 2012

Screenshot of the Twenty Twelve WordPress theme

Working on the new default WordPress theme, Twenty Twelve, has been a very special, exciting, and humbling experience. We got off to a slow start earlier this year, but the pace has picked up significantly since then, and we’re now preparing to move the codebase back into WordPress core.

Live demo

We have a live demo of Twenty Twelve hosted over on WordPress.com!

Twenty Twelve isn’t finished yet, but all the major styling is complete. The goal was to design a clean, minimal, and responsive theme, with a focus on typography and readability. I think we met that goal and I’m really happy with where we are right now. Take it for a spin and let us know what you think.

Read more

Resizing images for WordPress

By team on June 26, 2012

You’ve chosen one of our themes and are ready to upload graphics to your website, such as a logo, banner, or some photography shots. But before you continue, you’ll need to make sure your images are correctly cropped and optimised – and this the perfect post to help you. We’ll discuss why you need to crop and optimise images before uploading them to WordPress and the importance of saving your photos in a suitable file format.  

Let’s start by covering the basics. 

Image optimisation is when you reduce the file size of your image without losing quality. To reduce the size of the image, you’ll need to resize it. Image resizing can be done by either cropping or scaling. 

If you need the size of your image altered, why not just go for cropping? Well, cropping can reduce the size of your image, but it’ll change the proportions of the entire image, and you can lose valuable image data. That’s why you should only crop your image to reduce its size when you wouldn’t mind losing parts of the picture. 

Scaling is the best way to optimise an image because it lets you fit the exact requirements of your application. Scaling keeps the image dimensions intact, you don’t have to cut off any parts of your image, and it allows you to reduce your file size without having to sacrifice the quality. 

An overview of image properties will help to understand the process of resizing and optimisation better. 

Properties of an image 

A variety of things determines the size and quality of an image for use on a web page. 

  1. File Size

The file size of an image is how much storage space it takes on the server or a drive. The lower your image file size, the less time it will take to load on your page. Keeping an optimum file size is key to creating a suitable web page because an extra small image file size will lose quality and a too large image file size will take too long to load.  

  1. Physical Size

The physical size of an image is a combination of its size on the screen and its file size. The physical size determines how much total space an image will take on any page. If your WordPress theme has a fixed width sidebar and you use an image that occupies too much screen space, it will push the rest of your content to the side. It can ruin the layout of your entire page, which is why it’s necessary to pay attention to the physical size of your image. 

  1. Image Resolution

The resolution describes the number of pixels found in an image. It is usually a description that includes the width, height, and the total number of pixels in an image. Pictures with higher resolution have more clarity and vice versa. However, an image with a large resolution value would increase its file size, again making loading and storage an issue. This is where you have to decide how you’ll balance file size and quality. 

  1. Image Format

The format of an image is identified by its extension, which comes at the end of the file name. There are a bunch of image formats you’ll find such as JPG, JPEG, PNG, TIFF, Exif, and GIF. Each image format has its distinct properties, pros, and cons to use for different applications. Don’t worry, we’ll discuss some popular image formats and their main features in the following section. 

Popular image formats 

It’s easy to see now that your image files are influenced by two key factors — file size and quality. Therefore, optimising your graphics is a game of balance: file size affects how fast your images will load; quality determines how your photos will look to your readers. 

Although there are many file formats out there, we’ll focus on three of the most popular ones that are found on the web today. 

  1. JPG 

Compression 

JPG (Joint Photographic Experts Group) is a lossy file format. 

Applications  

The JPG file format is best for saving large photographs or banners. 

Benefits 

Since JPG is lossy, the file size is usually small. 

Drawbacks  

There are a few drawbacks to this file format, such as the fact that it removes detail from a photo and doesn’t support transparent backgrounds. 

  1. GIF  

Compression 

A GIF (Graphics Interchange Format) has lossless compression. 

Applications  

The best application for a GIF image is when you need to store graphics with very few colors e.g., shapes, logos, cartoons, or simple diagrams. Its animation capabilities are widely used nowadays for creating animated GIFs.   

Benefits 

This file format is simple and is supported by almost all types of software. 

Drawbacks  

GIF images aren’t suitable for photographs or pictures that need high quality. 

  1. PNG 

Compression 

PNG (Portable Network Graphics) is a lossless file format. 

Applications  

This file type is excellent for both photographs and simple line art. PNG files are perfect for logos, buttons, small background textures, and other such interface elements. 

Benefits 

PNG files have great image quality, and they have the feature of transparency. 

Drawbacks 

While a PNG image is of high quality, it also has a larger file size. Additionally, some older browser versions don’t adequately support the file format. 

Now that we’ve gone through the most fundamental image properties, it’s time to find out why exactly we need to resize and optimise. 

Why is resizing and optimisation important? 

Maybe your images aren’t appealing enough, or your photos load slowly. Cropping, resizing, and optimising your images properly will fix both problems. Mastering — or, at least, learning — these techniques is an essential step in building a successful WordPress site. You’ll create better visual content, speed-up the uploading process, reduce bandwidth usage, and shed inessential bytes from your graphics files. 

The following are some key points explaining how the wrong image size can affect your website. 

  1. Large images can slow down your site 

Loading large sized photos takes time, which is why if you use images that have too big dimensions, they’ll considerably reduce your site’s speed. When you use optimised images, your webpage will load more quickly — and readers love speedy sites. 

  1. Oversized images take too much server space 

Unless you have an unlimited amount of server space available, you need to cater to the amount of storage your media files take. If unnecessarily large image files take up most of your WordPress storage, it won’t leave any room for other essential files. Your server will become overfilled, not to mention slow, very quickly. 

  1. Your theme might not work properly 

Majority of WordPress themes are optimised specifically for a range of image sizes. If you upload images whose dimensions fall out of that range, chances are, your theme will not appear like you’ve expected it to. 

To sum everything up nicely, here are the benefits of accurately resizing and optimising your images: 

  • Easy and quick uploading (and downloading) 
  • Your website will load quickly 
  • Reduction in bandwidth usage 
  • You’ll have better visual content 
  • You’ll save server space 
  • The images will fit perfectly in your theme 

Why use a photo editor? 

There are a few ways you can resize and optimise your images for WordPress, but using a photo editor is by far the quickest and most efficient method. Almost every photo editor you find will include tools for cropping and resizing images. 

Before uploading an image to your site, search for an easy-to-use photo editor either online or as a downloadable PC software. Usually, both types of software are very straightforward to use, and they’ll give you good results. Using an online photo editor is an excellent option if you’re looking for a tool that’s easily accessible yet powerful. 

Some photo editors also give you the option to “batch edit” your images, which means you get to apply edits to multiple photos at once. This can be utterly useful if you need a large number of pictures edited – much better than having to edit each image one by one. 

An example 

Now that we’ve discussed photo optimisation, standard file formats, and picture editing, let’s walk through an example. 

Before we start, it should be noted that all of our themes auto-crop and scale to fit your images to content areas such as the Featured Slider and Featured images. We also include important image dimensions within each of our theme tutorials to help you pre-crop your photos. 

Let’s use the case of the Canvas Prints Free Photo Editor, which is a free online image editing tool by the Canvas Prints. The following tutorial includes the example of the Canvas Prints Free Photo Editor, but feel free to use your preferred image editor. 

Let’s crop a photo to use as a Featured image in our Portfolio theme. First, I’ll check the theme tutorial for the correct dimensions. The documentation specifies a width of 860px and a recommended height of 450px. In this particular case, the height is only recommended and can be adjusted to your liking. 

Step 1: Open 

After reaching the editor website, we’ll choose the that we need to edit. Once the picture is uploaded, the photo editor launches. 

The image I’ve chosen for this example is 4920 x 3251 pixels. If you need to find high-quality stock photos for your website or blog, you can check out this list of best free stock photo sites

Step 2: Resize 

If you’re working with photographs from your camera, the chances are your images are going to have enormous dimensions. These large image dimensions are great for print, but in most cases, smaller sizes are better for the web. 

We only need to cater to the width dimensions of the image, since the desired theme specifies a width but only recommends a height. Once you’ve opened your image and are ready to start editing, navigate to Resize from the top menu bar and make sure to select Maintain Aspect Ratio.  

Enter the required width dimension, which in this case is 860 px, and don’t worry about the height because it’ll be adjusted according to the aspect ratio.   

Once you’ve resized your image’s width according to the requirements, it’s up to you to resize the height. If you choose to do so, select Crop from the main menu bar and then enter 450 px value in the height option. 

The photo is now according to our required dimensions for the theme. 

Step 3: Save 

Now that your image is resized, select Save from above the main menu bar to save it to your computer. 

Step 4: Upload 

Now it’s time to upload this image to WordPress. Within your WordPress dashboard, navigate to Media → Add New. Upload the edited image to your media library. 

Then, click to edit one of your pages. Under the Featured Image panel, click Set featured image. Select the image from your media library, then, under the Featured image on Detail page option, select Full Image. Selecting this option displays your image at its maximum dimensions (860 × 450).  

Update or Publish your page and view the results. 

You now have a resized image, which fits perfectly in your theme and will load much more quickly than the original file. 

More software you can use 

We’ve gone through the process of resizing an image using the Canvas Prints Free Photo Editor, but there are tons of other tools available. Here are three of the top image resizing and optimisation programs that can be easily found online: 

1. BeFunky 

With BeFunky, you can quickly resize your photos by changing its height and width, or by altering the percentage scale. If you only want to change the width or the height, PicMonkey adjusts the other parameter accordingly. 

2. B.I.R.M.E 

B.I.R.M.E. (Batch Image Resizing Made Easy) is a wonderful option for bulk image resizing. The best part about this online photo editor is that it provides a preview of your images before you can save them, so you’re able to see if you’re satisfied with the results. 

3. Rszr 

Rszr is a free online tool which lets you easily crop or resize your images. It’s fast, simple, and very effective. 

Resizing and creating the most optimum images has a lot of advantages. It’s reasonably easy to use an online tool such as the Canvas Prints Free Online Editor to resize your image for a WordPress theme. 

You’ve also learned the basics of image types and properties, and what optimisation is all about, now it’s time to get busy resizing and showing off your images! 

PS: If you’re looking for even more, check out Jon from EngineScout’s “must read” WordPress image sizing guide.

New theme customizer now available

By team on June 15, 2012

For anybody who doesn’t follow WordPress development updates, you’ll be happy to learn that the next version of WordPress (version 3.4) is now available!

WordPress 3.4 features a number of improvements and updates, but the most exciting feature for us is the introduction of the real-time “theme customizer”, which allows you to preview changes to your theme options as you make them, eliminating the need to save/refresh your site to see what has changed.

We’ve been keeping an eye on WordPress 3.4, and now that it is released we’re proud to announce that our 4 most recent themes (Portfolio, Chalk, Duet, and Anthem) support the theme customizer for all theme options.

Read more

Portfolio available on WordPress.com

By team on June 7, 2012

Our very own Portfolio theme is now available for WordPress.com sites and blogs. You may purchase the theme directly from your WordPress.com dashboard or from the Portfolio theme showcase page.

When you buy a theme on WordPress.com you get the same quality support, but your theme and website are hosted in the WordPress.com environment. It’s easy to use and you don’t have to worry about updating WordPress or your theme.

Read more about the differences between WordPress.com and self-hosted WordPress and browse all our themes available on WordPress.com.

Twenty Twelve: Typography

By team on May 17, 2012

Screenshot of the Open Sans font in Twenty Twelve

As you may have read earlier, I’m currently working on the the new WordPress default theme, Twenty Twelve. One of the early Twenty Twelve discussions was about typography. I felt it was important we use a web font. Not only would a web font look great, it would also show WordPress is pushing forward to adopt new web development technologies. The font would obviously be open source, so we had 2 options:

  1. Use the free open-source Google Web Fonts directory to load the font directly through Google’s external API.

  2. Package it with the theme and use CSS to load the font. We would have to ensure a GPLv2 compatible license in this case (more on this later).

In the end, it was important to choose a great looking font with extensive language support. Whether we included it in the theme or not was a secondary concern.

Read more

What’s a premium WordPress theme worth?

By team on May 8, 2012

Over the years we’ve had questions and feedback from customers about our theme pricing. Recently this prompted some thinking about what a premium WordPress theme is worth and why our themes cost what they do.

What is value

Merriam-Webster defines value as “a fair return or equivalent in goods, services, or money for something exchanged.” The modern world most of us live in is predicated on value and exchange of goods. For example, I buy some food supplies from my local grocery store — the grocery delivers value, and I provide money in exchange for that value. This allows the grocery to deliver value to other customers, pay their employees, pay their vendors, and sometimes realize a profit for the business itself. The circular nature of this system allows everyone to provide value in their own way, and receive a widely accepted currency in return for this value. It’s truly a beautiful thing.

Read more

Presenting Portfolio

By team on April 26, 2012

Every theme at The Theme Foundry starts out as an idea that is discussed and then put to paper by our designers. We review and refine the design, and then we build it out in HTML so we can see the design come to life in the browser. From there, every theme is constructed from the ground-up (no frameworks) as we try to build upon the successes (and failures) of our previous themes.

Read more

Querying posts with a false or NULL meta value

By team on April 24, 2012

As I was working on our latest theme, I came across a situation where I needed to filter out posts that had a specific meta key that either never was set (NULL) or was false. I started down the route of using the meta_query argument to WP_Query.

Read more

Twenty Twelve: First sketches

By team on April 19, 2012

At the end of last year Matt and Lance contacted me and asked if I’d be interested in designing Twenty Twelve, the default WordPress theme for this year. I was of course honored and excited, and after some discussion about expectations and details, we started the project in relative secrecy.

After a fast start, Twenty Twelve development slowed to a crawl in February (which was my fault) and in March we decided including it in WordPress 3.4 wasn’t a good idea. Since then we’ve re-focused, moved the Twenty Twelve repository to Github, and established a regular work schedule to ensure it’s ready for WordPress 3.5.

Update! Twenty Twelve has launched.

Twenty Twelve has launched and is now available in WordPress 3.5 and available for download in the WordPress repository. If Twenty Twelve is too basic for you, be sure to check out our WordPress templates or read our guide on finding the best WordPress themes.

Read more

Toggle an extra row of buttons with WordPress

By team on April 12, 2012

As a theme developer, there are situations when having some extra buttons on the content editor can come in handy. WordPress provides the mce_buttons_3 hook, which allows you to add buttons to a third row on the visual editor.

3rd row of buttons with the kitchen sink on

However, by default this row will show no matter what, even when you toggle the “kitchen sink” on and off:

3rd row of buttons with the kitchen sink off

It seems more logical to toggle the third row on and off along with the rest of the advanced buttons. In fact, there is a core ticket dealing with this very situation. Read more