I am trying to: Show an image gallery and be able to click the images to lightbox
Link to a page where the issue can be seen: Working locally
I expected to see: A grid of 4 images (gallery) which can be clicked to open them in a lightbox
Instead, I got: Images (not always 4, it depends on the size) and this message when click "The image could not be loaded"
More info: I was working with this tutorial, but still I can't reach to do what I need
https://toolset.com/2017/10/adding-a-gallery-of-images-for-custom-posts/
Shane
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
America/Jamaica (GMT-05:00)
Hi Jaime,
Thank you for contacting our support forum.
Would you mind allowing me to have access to the site so that I can have a look at this for you ?
The private fields have been enabled for your next response.
Thanks,
Shane
Hi Shane.
Here you have the Duplicator package.
lien caché
user: Shane
pass: admin
The CPT where I'm working is
afc/localizacion/bodegas-tio-pepe/
And the Layout where I'm working is called "Plantilla para Localizaciones"
I paste you here the exact code from the gallery which is not working properly, just in case is easier for you with it
<p>
[types field='galeria-de-imagenes' title='%%TITLE%%' alt='%%ALT%%' align='left' size='custom' width='200' height='200' resize='crop'][/types]</p>
Shane
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
America/Jamaica (GMT-05:00)
Hi Jaime,
The issue was that u were missing the [wpv-for-each] shortcode.
Try using this and it should work fine.
<p>[wpv-for-each field="wpcf-galeria-de-imagenes"]<a href="[types field='galeria-de-imagenes' size='full' url='true'] [/types]">[types field='galeria-de-imagenes' title='%%TITLE%%' alt='%%ALT%%' align='left' size='custom' width='200' height='200' resize='crop'][/types]</a>[/wpv-for-each]</p>
Please let me know if this helps.
Thanks,
Shane
Great Shane!
Yes, I'd put the for-each but it didn't work for me.
Now I can see what I've been doing bad. Thanks a lot.
I last question.
Is it any way to set the number of images to a specific number? I want the gallery shows 4 images on a medium size.
Thanks!
Shane
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
America/Jamaica (GMT-05:00)
My issue is resolved now. Thank you!