Hi
For a directory site of advocate, some profile give their photo and other don't
If there's no photo a avatar take place so I make a conditionnal like that :
[wpv-conditional if="( $(wpcf-photo) eq '' )"][types field='photo' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional' item='@coordonnees.parent'][/types]
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-photo) eq '' )" evaluate="false"]<img style="width:120px; height:120px;" src="lien caché">
[/wpv-conditional]
[types field='prenom' item='@coordonnees.parent'][/types]
And the ‘photo' field is a parent of 'coordonnees'
And it doesn't work
A link a for example :
lien caché
Thanks for your support
Eric
Hello, for one thing you are displaying the avatar in the wrong conditional. It should be in the eq '' conditional, not the evaluate="false" conditional. If you place the shortcode outside the conditional, does it work by itself?
[types field='photo' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional' item='@coordonnees.parent'][/types]
If so, then you can use the Types field shortcode directly in your conditional, like this:
[wpv-conditional if="( '[types field="photo" output="raw" item="@coordonnees.parent"][/types]' eq '' )" evaluate="false"]
[types field='photo' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional' item='@coordonnees.parent'][/types]
[wpv-conditional if="( '[types field="photo" output="raw" item="@coordonnees.parent"][/types]' eq '' )"]
<img style="width:120px; height:120px;" src="<em><u>lien caché</u></em>">
[/wpv-conditional]
My issue is resolved now. Thank you!