Skip Navigation

[Resolved] Set format in wpv-user shortcode

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.

This topic contains 2 replies, has 2 voices.

Last updated by Christian 1 year, 7 months ago.

Author
Posts
#2585971

Tell us what you are trying to do?
I'm trying to output a custom user field from the current logged in user. Therefore I'm using [wpv-user field='wpcf-studiengang']. That works great, but it outputs the custom field content (slug) not the display text. How can I set the output format like I can do with [wpv-current-user]?
Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/
Is there a similar example that we can see?

What is the link to your site?

#2586025

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

You want to use the types shortcode with the usermeta attribute to specify that the field is a user custom field, e.g.

[types usermeta="my-field"][/types]

Check this page, and expand the More sections under the individual field types for examples of the attributes available: https://toolset.com/documentation/customizing-sites-using-php/functions/

#2586029

My issue is resolved now. Thank you!!!