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

Have your Say

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s