Updated on August 04, 2020

This members-only tutorial provides the steps to show post-specific information like title and excerpt in a lightbox using GLightbox when the featured image is clicked for each post in an Easy Posts grid with left/right arrows + keyboard navigation inside the lightbox in Oxygen.

Live Demo
(scroll down to Portfolio section)

We shall

  • use a default/fallback image for posts that do not have a featured image.
  • add a dark overlay and magnifying glass svg icon on image hover.

Step 1

Let us define a custom image size for the images in our lightbox posts grid.

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Custom Image Sizes


add_image_size( 'grid-lightbox-image', 900, 650, true );

For a uniform grid (unlike in the demo site), you might want to ensure that all the featured images have the same dimensions as in the above snippet. Replace the width and height values as needed.

Add another Snippet.

Title: Custom Excerpt


This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?


Find the article helpful and wish to donate?



You need to be logged in to view and post comments.
Not a member yet? Join here.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: