The code in this mini plugin folder adds the lightbox popup affect to the images in your WordPress gallery. The code :
- Can be used as a plugin and simply install the affect in 1 click.
- Can be Copied and pasted into your child themes functions file and use it as is or modify it.
- Includes a function which enables you to add the lightbox attribute and any other attributes to your WordPress gallery images.
- Loads the lightbox scripts directly from the official CDN.
Lightbox 2 is small javascript library used to overlay images on top of the current page. It’s a snap to setup and works on all modern browsers.
Demo Video
Shows the gallery images displaying in a light box when using the create gallery function built into the media functionality native to WordPress.
Works in any WordPress theme.
Installation
Install the zip folder as a new plugin or copy and paste the PHP code to the end of your child themes functions file and clear caching.
Was This Tutorial Helpful?