WordPress galleries and Lightboxes

Often, when I start looking for a WordPress plugin to achieve something I find that the functionality I need – or much of it – is already included in the core code. The WordPress Gallery is a case in point.

So here’s the requirement: I want to add several pictures to a post, automatically formatted into a thumbnails gallery allowing visitors to click on the thumbnails to see the full size images. This can be achieved with no additional functionality at all. All you need to do is upload the pictures into an existing post using the Add An Image button.

The point to remember here is that, when you upload each image, you do not want to Insert Into Post. Use the Save All Changes button instead. This will add the image to your gallery – you can see the image count rise at the to of the Add an Image Window.

As soon as you have added two or more pictures, WordPress will start displaying Gallery Settings every time you upload an image. These settings are reasonably self-explanatory. If, once all your images are uploaded, you click on the Insert Gallery button you will see the following shortcode in your post:

[gallery]

And the result looks like this:

There are several options you can use, described here, and by default clicking on an image will take you to the permalink page for that image – essentially the full sized image but surrounded with the styling used across your blog.

You can, however, go a stage further and add a Lightbox. The one I have found to work most nicely is the jQuery Lightbox For Native Galleries which has a demo-page here. This displays the images in a pop-up without leaving the post and… It’s just a bit prettier.