I am trying to: display multiple images that are linked to a user but and not getting anything. they are visible in the edit cred form
[wpv-conditional if="( [wpv-user field='wpcf-gallery'] ne '')"]
<div class="row view-item-heading view-item-name">
<div class="col-md-12 view-item-name">adsfasda
<hr>
[wpv-for-each field="wpcf-gallery"] [types field='gallery' alt='%%ALT%%' title='%%TITLE%%' size="thumbnail" align='none' separator=' '][/types] [/wpv-for-each]
<hr>
</div>
</div>
[/wpv-conditional]
I visited this URL:
I expected to see:
Instead, I got:
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Oliver,
Thank you for contacting our support forum.
Does the code above generate the correct gallery output that you desire ?
Please let me know.
Thanks,
Shane
No, it the loop does not work so no gallery.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Oliver,
Would you mind providing me with admin access to the website so that I can take a further look at this ?
The private fields will be enabled for your next response.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Oliver,
Thank you for the patience so the issue here is that the 'Field' attribute does not work for users you will need to use the 'usermeta' attribute.
[wpv-for-each usermeta="wpcf-gallery"] <a href="[types usermeta='gallery' size='full' url='true' separator=', '][/types]">[types usermeta='gallery' alt='%%ALT%%' title='%%TITLE%%' size="thumbnail" align='none' separator=' '][/types]</a>[/wpv-for-each]
This should now work as i've tested this with this user here.
hidden link
Thanks,
Shane
Shane,
Thanks a million, almost there with this.
When I click on the smaller image to get a larger one the hyperlink for each image has all 3 images separated by a coma, and therefore it cannot find the link to the larger image.
Any help greatly appreciated.
thanks
Oliver
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Oliver,
Could you try using this plugin below to see if the images would start opening in the Lightbox.
https://wordpress.org/plugins/fancybox-for-wordpress/
Thanks,
Shane
Almost there.
I am now getting the message
"The requested content cannot be loaded.
Please try again later."
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Oliver,
Are you getting this error after you installed the fancybox plugin?
Please let me know.
Thanks,
Shane
No error when plugin was install. The message appear when I click on the images on the page.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Oliver,
Could you try this plugin instead
https://wordpress.org/plugins/easy-fancybox/
This is the exact one that is being used on our demo.
Thanks,
Shane
I tried to use the other plugin but it did not make any difference.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Oliver,
I see that you have it in this format.
[wpv-conditional if="( '[wpv-user field='wpcf-gallery']' ne '')"]
<div class="row view-item">
<div class="col-md-12 view-item-details">
<hr>
[display_all_images big_img = "[types usermeta='gallery' size='full' separator=',' url='true' ][/types]" small_img = "[types usermeta='gallery' size='thumbnail' separator=',' url='true' ][/types]"]
<hr>
</div>
</div>
[/wpv-conditional]
However our demo using the Easy Fancybox plugin has it in this formation here.
[wpv-for-each usermeta="wpcf-gallery"] <a href="[types usermeta='gallery' size='full' url='true' separator=', '][/types]">[types usermeta='gallery' alt='%%ALT%%' title='%%TITLE%%' size="thumbnail" align='none' separator=' '][/types]</a>[/wpv-for-each]
Please revert to using the format above and let me know if it works now.
Thanks,
Shane