Skip Navigation

[Resolved] Image gallery not showing as I spected

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here was that the user wanted to display their repeatable fields individually.

Solution:

To do this I would recommend have a look at the link below.
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-153482

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Jaime 5 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1185996

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/

#1186016

Shane
Supporter

Languages: English (English )

Timezone: 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

#1186025

Hi Shane.
Here you have the Duplicator package.
hidden link

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>

#1186036

Shane
Supporter

Languages: English (English )

Timezone: 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

#1186045

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!

#1186114

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jaime,

There is an end attribute that you can use.
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-153482

Thanks,
Shane

#1186115

My issue is resolved now. Thank you!