O'Reilly logo

SMASHING: WordPress Themes: MAKING WORDPRESS BEAUTIFUL by Thord Daniel Hedengren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 8

A MEDIA THEME

IN THIS CHAPTER, I show you how to build a theme that focuses on images rather than text. This site could be a portfolio that shows off your photos, videos, or art, or any site that relies heavily on images and their descriptions. An image may speak a thousand words, but when it comes to WordPress that phrase simply means you need to think a bit differently about layout and design. You have to consider other issues and concerns as well, such as how to show image information, image titles, and so on when browsing a media-focused site.

In the following sections, I show you how to build a portfolio theme.

BUILDING SITES FOR IMAGES AND VIDEO

Text isn't always the primary type of content on the site you're building. You may also want to showcase your photographs or videos. You can use just about any theme for this, of course, but if you want to display a large, pretty image (see Figure 8-1), the ideal column width for text just won't do.

In short, sometimes you're not building for text, you're building for attachments.

Attachments are the kinds of files you typically add to your post and often these files are images. The main template file for displaying attachments, when they're not just sitting in a post, is attachment.php.

Figure 8-1: This is what you're after, a display focused on image content

image

PLANNING YOUR PORTFOLIO SITE

The theme I build in this chapter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required