In the members-only forum, a user asks:
I need to make the featured images in posts on http://www.dunnandgone.com link to a lightbox showing the full-size image. I've attempted to make this work several times, and nothing has worked. Could you please post a tutorial for this? I would also like to link the photo banner at the top, which is just a text widget that contains a single image, to a lightbox gallery that displays the full-size versions of the images shown in the banner.
genesis_do_post_image()function has the code that displays Featured image linking to Post's permalink per Genesis theme settings. We can unhook this function, modify it so the Featured image links to the full image, add the markup required for lightbox and re-hook it back at
genesis_entry_content. For the lightbox we shall use Featherlight.js jQuery script. To answer the user's question about gallery part of his tutorial request, I show how Featherlight's gallery extension can be enqueued and used.
Step 1Upload featherlight.min.js to child theme's
js(create if not existing) directory. Upload featherlight.min.css to child theme's
css(create if not existing) directory.
Step 2Add the following at the end of child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.