Skip Navigation

[Resolved] user view with repeating image gallery

This support ticket is created 7 years, 4 months 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.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 13 replies, has 2 voices.

Last updated by oliverD 7 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#550773

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:

#550940

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

#550973

No, it the loop does not work so no gallery.

#551039

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

#551090

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

#551396

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

#551454

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

#551695

Almost there.
I am now getting the message
"The requested content cannot be loaded.
Please try again later."

#552109

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

#552379

No error when plugin was install. The message appear when I click on the images on the page.

#552577

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

#552615

I tried to use the other plugin but it did not make any difference.

#552714

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

#552718

Hi,
I found this support it and use the same shortcode as outline.

https://toolset.com/forums/topic/wpv-for-each-fieldwpcf-images-wpv-if-evaluatetypes-fieldimages-out/