Reply To: Thumbnail gallery for image posts

Your Account / Forums / Easy FancyBox Pro / Thumbnail gallery for image posts / Reply To: Thumbnail gallery for image posts

July 12, 2016 at 12:29 am #6767

The theme supports a child theme and that is where i am making my changes.

OK excellent, we can safely proceed then 🙂

The next steps depend on how your FancyBox Auto-gallery settings are. I’ll assume here that the option Autogallery is set to “Galleries per Section (below)”.

1. Go to Setting > Media and add , li.mason-item, li.grid-item to the Section(s) field.

2. Next we’ll have to add some lines to produce a hidden div with the post content (which should contain all the other images) but I see there is a problem with the code snippet you pasted above. There is a line with <?php endif; ?> missing and many HTML tags are not closed. I suppose you left out some lines before the final <?php endwhile; ?> there?

This is not a problem but I cannot exactly tell you where to put the next code. I would suggest to search for the closing </li> tag (should be there just before the <?php endwhile; ?>) and place the following snippet just before it.

<div style="display:none">
	<?php the_content(); ?>

This should add each complete post content while keeping it hidden. Only when opening the image in the light box, it should be possible to click through to all the related post images…

If it’s not working, please provide a link to your site so I can take a look. If you prefer not to share it publicly on this forum, you can use the contact form.