Skip Navigation

[Resolved] Display title and caption of images in custom fields

This support ticket is created 5 years 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 – 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)

This topic contains 3 replies, has 2 voices.

Last updated by JamesK4399 5 years ago.

Assisted by: Waqar.

Author
Posts
#1232973

Hi,

I read through a dozen support tickets about captions. They often ended with a status of "issue resolved" without revealing the final answer in them.

We want to add several galleries that are not necessarily sliders. An example would be 5 or 6 pictures from a specific office location showing how the company and staff are involved in the community. The pictures would have a title and a caption like "Earth Day 2019" and "Our entire staff volunteered for the clean up effort of the coastal parks in our county."

To be clear I'm talking about the title and caption already captured as part of the media library.

I can handle the formatting with css. Just looking for something like [type office-photo index="1"][type office-photo-title index="1"][type office-photo-caption index="1"]

Thanks, Jim

#1233005

I'm thinking now that it might be easier to use a repeatable field for this. I think that will be easier for the user...

#1233282

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Jim,

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

You can use the repeating image fields to create the galleries and can also get the alternate text and title from those images:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image

The following guide has more details on the topic:
https://toolset.com/2017/10/adding-a-gallery-of-images-for-custom-posts/

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

regards,
Waqar

#1235901

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.