Problem: I would like to display an iamge stored in a Types User Field, but the Views shortcodes wpv-user and wpv-post-author don't seem to be working correctly.
Solution: Use the Types Field API types_render_usermeta or the Types Field shortcode to display an image from a Types User Custom Field.
Shortcode example:
[types usermeta="your-field-slug" alt="blue bird" width="300" height="200" proportional="true" user_is_author="true"][/types]
PHP API example:
types_render_usermeta("your-field-slug", array( "alt" => "blue bird", "width" => "300", "height" => "200", "proportional" => "true", "user_is_author" => "true" ) );
Relevant Documentation: https://toolset.com/documentation/customizing-sites-using-php/functions/#image
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 3 replies, has 2 voices.
Last updated by 3 years, 10 months ago.
Assisted by: Christian Cox.