One Thumbnail to open gallery – please help
-
Hello,
I have found the description to make one thumbnail to open the gallery. But it does not work. I think I don`t make it right.
This is the manual to do it:
A.
Open your post for editing in HTML mode and insert the first image thumbnail in your post content (linking to the images file, not page) to serve as the gallery thumbnail.
B.
Place the following code to start a hidden div containing all the other images that should only be visible in FancyBox:
<div class=”fancybox-hidden”>
C.
Right after that starting on a new line, insert all other images you want to show in your gallery. You can even use the WordPress internal gallery feature with the shortcode [gallery link="file"]. NOTE: if the gallery thumbnail is attached to the post, it will be show a second time when flipping through the gallery in FancyBox. If you do not want that, use an image that is not attached to the post as gallery thumbail.
D.
Close the hidden div with the following code on a new line:
</div>What is wrong in my code? – sorry, I am a beginner.
<a href="https://xyz.com/wp-content/uploads/2012/10/sample-menu.jpg"><img class="alignnone size-full wp-image-81" alt="sample-menu" src="https://xyz.com/wp-content/uploads/2012/10/sample-menu.jpg" width="1140" height="550" /></a> <div class="fancybox-hidden"> [gallery link="file" ids="188,186,65,199"] </div>
- The topic ‘One Thumbnail to open gallery – please help’ is closed to new replies.