DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Tag: lightbox

Create a Stunning Lightbox-Style Random-Post Header Gallery

Posted by on

In this tutorial, we’re going to take advantage of two of WordPress’ most powerful features, get_posts() and custom fields, to create a stunning random lightbox-style header gallery for your post images. Displayed before the standard post loop, this lightbox gallery will randomly display the images that are associated with your posts while also providing a descriptive title link to the post itself. Here is a graphical representation that will help us visualize what we are going to do:

Code is poetry