I am trying to:
Setup an image gallery, the image gallery works but the link on each image jumps from the single URL to all the URL of the image gallery items at once, preventing the lightbox to work properly returning nothing but error missing image.
Link to a page where the issue can be seen:
I expected to see:
the image clicked to be displayed in light box
Instead, I got:
Broken Image...
You can see a vdo of the problem here: hidden link
On a last note, I was using an elementor Image Gallery widget before, however and like on another site the widget with toolset is really buggy, it will show duplicates versions and images from the post but not in the gallery like the logo and other image file relating to other fields .. the only way to avoid this was to use the shortcode but then this happens 🙁
Before I test this locally, another option would be to use the Toolset Gallery Block to create your gallery and then you wouldn't have to enqueue a 3rd-party gallery library.
Create a Content Template (not assigned to any post type) and set up the gallery using the block editor within that template.
Then insert the shortcode to output that template into your Elementor design in a shortcode module.
I checked that locally and it worked, would that be an option for you?
There is a quirk in the details of how you do this if you want to try.
To set up the gallery in the content template, you must choose to preview a post that has images for you to be able to create the gallery and choose the image settings. But you can only preview posts or pages in an unassigned template. So you first need to create the template and say assign it to the post type in question, set up the gallery block, then change the document settings to unassign the template from any post type.
Try inserting the template using the Fields and Views button in a normal page so that you can then copy the generated shortcode and paste it into your Elementor module.
Ok, not that straight forward and still puzzled as to why the gallery with repeating image just won't work "easily" via elementor or using wp-for-each method; but now it is working using LAyout > add views/layout /using shortcode in elementor;
Many hoops jumped but I guess it works 🙂