This support ticket is created Il y a 6 années et 8 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.
I use layouts to display a custom post typer. This post type uses a repeater field for special images (slug = tables-figures).
Up untill now I showed the images simply with this code:
[types field='tables-figures' alt='%%ALT%%' title='%%TITLE%%' size='full' align='none' separator=', '][/types]
But now we want to display the description (if there is one) to apear beneath the image.
I tried to change the seperator value to a div with the description like this, but that does not work:
[types field='tables-figures' alt='%%ALT%%' title='%%TITLE%%' size='full' align='none' separator='<div class="imgdescr">%%DESCRIPTION%%</div>'][/types]
Les langues: Anglais (English )Espagnol (Español )
Fuseau horaire: Europe/London (GMT+00:00)
Hi Jim
It sounds like you should be using the wpv-for-each shortcode to loop over each iteration of your repeating image field, outputting just the current image for each iteration as well as whatever else you want to display, such as the description.
The only problem being that there is no way to output the description from a custom image field.
So you will still need a custom shortcode, together with the wpv-for-each loop.
The following can be used to register a shortcode that will output the description of an image from the media library where the URL of the image is passed as an attribute.
[wpv-conditional if="([description url="[types field='perfil' size='full' url='true'][/types]"] ne '' )"]
code to perform when description is available here...
[/wpv-conditional]
But that did not work... should it, or do you see the problem?