Navigation überspringen

[Gelöst] Set format in wpv-user shortcode

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

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Christian vor 3 years, 2 months.

Author
Artikel
#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
Unterstützer

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01: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!!!