Launching a Fancybox gallery from a button click
-
Hey guys,
Firstly, thank you for the plugin.
Secondly, I wanted to see if you can help me achieve something I am struggling with – I think it should be a simple thing to implement with the right know-how but I’ve tried to follow guidance online to no avail.
Basically, I want to launch a standard Fancybox gallery by having the user click a ‘View photos’ button on my website.
Does anyone know how to achieve this?
I have tried creating a native WordPress gallery, grabbing the gallery-id, hiding it and linking/launching the Fancybox from a button but it hasn’t worked (I grabbed some code from elsewhere online) I’ve also tried enabling the ‘create gallery from all images on page’ setting and then launching a singular image, but I couldn’t get this working either. You click the button and it either reloads the same page, or nothing happens.
I am using the Salient theme which runs on WPBakery page builder, and I am using the built-in button element (although happy to use a standard html button if required). I have the insert css/js plugin and the Fancybox plugin enabled, and everything is updated to the most recent version.
I have provided a link to my site, and what I want to achieve is similar to this page on a different website called Much Better Adventures (photos button on right hand side): https://www.muchbetteradventures.com/products/8136-adventures-kayak-and-wild-camp-norwegian-fjords/
The page I need help with: [log in to see the link]
- The topic ‘Launching a Fancybox gallery from a button click’ is closed to new replies.