Skip Navigation

[Resolved] Unable to get user picture based on user ID

This support ticket is created 3 years 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.

Our next available supporter will start replying to tickets in about 4.18 hours from now. Thank you for your understanding.

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

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 3 years ago.

Assisted by: Jamal.

Author
Posts
#2221887

I am trying to using the shortcode as per the documentation to get image based on user ID but does not seem to work.

What could I be missing?

[types usermeta='profile-picture'  align='center' width='100px' height='100px' output='img' user_id='[wpv-post-field name=wpcf-expert-coach-user-id]']

The image exists and the expert coach user id also exists.

#2222227

Hello and thank you for contacting the Toolset support.

First, make sure that both shortcodes returns the expected results without nesting them:
- Check if [wpv-post-field name=wpcf-expert-coach-user-id] returns the correct ID.
- Check (manually with the ID eg. 1234) if [[types usermeta='profile-picture' align='center' width='100px' height='100px' output='img' user_id='1234']] returns the image.

If both tests are conclusive, then you will have to registere the wpv-post-field name in Toolset->Settings->Front-end Content->3rd party shortcodes, so it gets evaluated before the types shortcode.

If that does not help, allow me temporary access to your website to check this closely. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Let me know where do you use these shortcodes, a post to test with.