O'Reilly logo

WordPress 2.8 Themes Cookbook by Lee Jordan, Nick Ohrn

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

Styling image galleries

Styling individual images is great when a user is uploading one or two images and manually inserting them. However, WordPress' real image-displaying prowess comes in the form of its gallery capabilities.

A WordPress gallery is output by using the gallery shortcode within a post. It collects all of the images attached to a post via the media uploader, and then outputs them using standard markup. Because the markup is consistent, styling it is easy.

Getting started

For this recipe, you need to have a basic theme created already. It should include a page.php or single.php file that displays full post content. If you don't have one, use the Default WordPress theme as a guide, or visit http://codex.wordpress.com/Theme_Development ...

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