[Resuelto] Displaying title OR caption OR description OR alt text for repeating image field
This support ticket is created hace 8 años, 9 meses. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hello and thank you for contacting Toolset support.
Could you please tell me where exactly you are willing to display your images with its associated captions. Few screenshots will be helpful to understand your issue.
Here's the page. At the moment the template is using some theme-specific code to output the images you can see here (with no alt tags). I want to replace that with the contents of the repeating image field 'wpcf-gallery-images' on the left of the page, with the title or caption for the image set both as the image alt tag and output below it in a <p>.
1)
As I understand you want to put existing set of image shown at left side + you want to add your repeating image field 'wpcf-gallery-images' on the left inside <p> tag
OR
you just want to show repeating image field 'wpcf-gallery-images' on the left inside <p> tag with alt and title tag.
2)
*** Please take FULL BACKUP of your database and your website.***
In order to investigate your issue if we require to check things on your install in order to see what could be going wrong there.
If you agree to this please use the form fields I have enabled below this comment box to provide temporary access details (wp-admin and FTP)?
As I understand now, you have created test page namely "test-for-toolset" and added gallery images to that pages, now you want to show this images with image title and alt tag and image title and alt tag should be equal to the page title, correct? if yes, could you please check now and see modifications done to your functions.php file or please let me know the corrections.
Hi Minesh, now the great Shortcode Crisis is over I'd like to get back to this.
What you have done is not solving my problem. I want to show the meta data from each piece of media with that media.
If you look at this image in the media library - hidden link - you can see that the title, caption, alt text and description are all set to:
'Moniack Mhor, sitting at 1000 feet, commands panoramic views of the local hills and countryside. The converted croft house and barn provides a cosy setting for writing courses and retreats throughout the year. Photographer: Nancy MacDonald'
THIS is the text I want to display, not the title of the page in which the image is embedded.
I debug your issue and found that actually why the code is not working when we compare "guid" field.
If you see post id = "228" in your database it has guid field value for post ID "228" with different domain name and when you saved types custom field image value its stored with different domain name.
I've modified the code in your functions.php file for now, could you please check and confirm its working for you as well.