OxyExtras makes it incredibly easy to have the thumbnails of WordPress/ACF/Meta Box gallery appear as carousel items which when clicked shows the corresponding larger image in a lightbox when using Oxygen.
It is possible to have the lightboxes from multiple carousels be treated as a single one or separate ones. By single, what we mean is that clicking next when viewing the last image of the first carousel (inside the lightbox) will show the first image of the second carousel. When they are separate, the lightboxes will act independently.
Let’s see how this can be put together without writing a single line of code using the Carousel Builder and Lightbox components.
Enable Carousel Builder and Lightbox components in OxyExtras’ settings.
In the Oxygen editor add a Carousel Builder component.
Select one of the galleries as the source of your images in the “Carousel content” dropdown.
In this example, let’s go with “Media Library gallery”. Click Browse and select/upload your desired images.
Set “Add links to images” to True.
Make any other configuration changes as needed.
Select the carousel’s parent element and add a Lightbox component so it is at the same level in the structure as the carousel.
Set “Lightbox content” to “Manual (using links)”.
Set “Link Selector” to .oxy-carousel-builder_gallery-image
Set “Group into slides” to Group.
Check on the front end and you can see that clicking on any of the thumbnail images in the carousel will open a larger version of that image in the lightbox with controls for autoplay slideshow, next etc.
Let’s now look at the case where you have more than 1 carousel on the same page that you would like to use lightbox with.
Go ahead and duplicate the carousel and lightbox components from before and move them so they are below the first lightbox.
Without any other changes, at this state, the carousels will behave as if they are combined i.e., left/right image navigation within the lightbox will flow between the two carousels.
If you wish to separate them, change “Link Selector” for the first lightbox to -carousel-builder-25-2 .oxy-carousel-builder_gallery-image where -carousel-builder-25-2 is the ID of the corresponding i.e., first carousel.
Similarly change the “Link Selector” for the second lightbox.
and we are done.
Créative, dynamique et très professionnelle, c'est à mon sens les piliers qui soutiennent cette équipe talentueuse ! Une agence à taille humaine qui privilégie la qualité et le résultat. Alors si vous souhaitez le meilleur pour votre communication adressez vous les yeux fermés à ces passionnés, plus que compétents ! (Translated by Google) Creative, dynamic and very professional, these are in my opinion the pillars that support this talented team! A human-sized agency that favors quality and results. So if you want the best for your communication, turn your eyes closed to these enthusiasts, who are more than competent!
Merci à Julien et son équipe, plus que satisfait par le travail fourni ! Je recommande vivement ! (Translated by Google) Thanks to Julien and his team, more than satisfied with the work provided! I highly recommend !
Ravi de travailler avec l'équipe JAG pour la gestion de mon site de e-Commerce. Equipe réactive et toujours pleine de bonnes idées pour améliorer les performances du site (Translated by Google) Glad to work with the JAG team for the management of my e-Commerce site. Responsive team always full of good ideas to improve the performance of the site
Merci à Julien pour son accompagnement dans mon projet, je recommande à 200% c est le Top (Translated by Google) Thanks to Julien for his support in my project, I recommend 200% it is the top
Excellente agence. Equipe est très pro, à l'écoute et de bon conseils. (Translated by Google) Excellent agency. The team is very professional, attentive and gives good advice.
Temps de réponse hors pair quand il y a eu un pb sur mon site, je vous recommande chaleureusement Julien :-) (Translated by Google) Unparalleled response time when there was a problem on my site, I warmly recommend Julien :-)