Skip Navigation

[Résolu] Need help setting up an image gallery for a post type

This support ticket is created Il y a 4 années et 9 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

Ce sujet contient 5 réponses, a 3 voix.

Dernière mise à jour par chienN-3 Il y a 4 années et 9 mois.

Assisté par: Waqar.

Auteur
Publications
#1523715
Edit_Content_Template_‹_TAP_Auto_Services_—_WordPress.jpg

I've created a custom post type for vehicles. In that type I have a repeating field group so I can have multiple images of the car for each post. i'm now trying to set up a Content Template to show the car information (Make, Model, etc.) and a gallery of the images for the car. I would like the images in the gallery to open in a lightbox for easy viewing. This is demoed in your demo site here:
lien caché

I can't load a demo site (and erase existing content) so I'm trying to add the functionality myself by following your procedure here:

https://toolset.com/documentation/user-guides/custom-content/create-image-galleries-using-toolset-and-custom-fields/

The problem I'm having is that when I add a Repeating Field/Gallery item in a block, I can't select my repeating field of my post.

On the right side of the block editor, I select the Post Source and Field Group (Vehicles) but there is nothing to select in the Custom Field dropdown (see attached picture - I can't capture that the list is empty in the screen snap but trust me, there is nothing there)
I can select "normal" custom fields from the field group (like Make, Model, Mileage) so I know it's connected to the custom field. I don't understand why I can't select the repeating field like you have in your doc.

I'm a little confused on this in general as well. I see other posts that say I have to create a View and loop through the images in the repeating field to show the images. I've actually done this and I can get the images to display but they are not in a "gallery" (lightbox, etc.)

What's the current way to get this done?

Thanks

#1524421

Hi Tom,

Thank you for contacting us and I'd be happy to assist.

The guide that you refer to ( ref: https://toolset.com/documentation/user-guides/custom-content/create-image-galleries-using-toolset-and-custom-fields/ ), uses an image field that is set to have multiple instances.
(please check the first screenshot of that guide)

But on your website, you mention that this field is inside a repeating field group, which is not needed in this case.
(since multiple images can be attached through a single image field, which can have multiple instances)

Please move that image field out from the repeating field group and remove that repeating field group and then check the "Repeating Field / Gallery" block's options again.

regards,
Waqar

#1526011

Hi Waqar,

Thank you very much for clarifying the instructions - I completely missed the use of a single field with multiple images.

I used the shortcode option and I have a grid of my pictures showing on the post. The only issue now is that when I click a picture, I get it showing on a new page, not in a lightbox. Is there lightbox functionality include somewhere in Toolset or is that something I have to add?

Thanks again for your great help,

Tom

#1526607

Hi Tom,

Thank you for the update and sorry about the mix-up in the earlier reply.

Adding a lightbox feature to these images is fairly simple if you'll use the "Repeating Field / Gallery" block, as shown in the guide that you mentioned earlier:
https://toolset.com/documentation/user-guides/custom-content/create-image-galleries-using-toolset-and-custom-fields/

Example screenshot: lien caché

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1529593

My issue is resolved now. Thank you!

#1571387

I still not understanding this, I am trying to create an image group where when they click on the image the image changes on the main display image and not do a pop out but changes the image on the gallery. how do I do that