Lightbox for WP Gallery

Add a Lightbox Effect to the WP Gallery (without a Plugin)

I think the Gallery component in WordPress is quite cool.  It’s a pity that if you link the gallery image to the image file, the browser displays the image file on its own page and you’re left without any other way of going back to the website except for clicking the back button.  This is far from ideal.

Users will have a much better experience if, by clicking on the image, this pops up with a fancy lightbox effect without leaving the gallery page.

In this post I wrote for SitePoint, I show you how to add a lightbox effect by integrating jQuery Colorbox with the WordPress Gallery from inside your theme.  All this without bloating your website’s code with one more WordPress plugin:

Adding a Stylish Lightbox Effect to the WordPress Gallery

Enjoy 🙂

Advertisements