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
Kirki Customizer Toolkit Banner

Optimize your WP Customizer Development with Kirki

WordPress themes users more and more expect to be able to change aspects of their theme’s appearance without touching any code. The latest tool to deliver theme options is the WordPress Customizer. Kirki is a great, evolving Customizer wrapper that optimizes development time with the WordPress Customizer.

If you’d like to know more about how to work with the Kirki Toolkit, here’s my latest article on SitePoint:

Fast WordPress Customizer Options Development with Kirki.