Skip Navigation

[Resolved] How do I display repeating custom user fields

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

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: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 8 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#346327

I am trying to:
Display repeated custom user fields.

I visited this URL:
https://toolset.com/documentation/user-guides/repeating-fields/
But doesn't mention custom user fields.

My custom repeating user field is called "Care cards"

I tried this shortcode:

[wpv-user field="wpcf-care-cards"  index="3"]

And this:

[wpv-for-each field="wpcf-care-cards"]
  <li>[types field="cred-field-care-cards"][/types]</li>
[/wpv-for-each]

(which I didn't expect to work, but tried anyways)

Please advise.

#346353

Dear peterv:

According to our document:
https://toolset.com/documentation/views-shortcodes/#wpv-for-each
wpv-for-each
description:
Iterate through multiple items in a post meta field and output the enclosed text for each item. Including Types repeating fields.

It only works in custom post fields, it does not work for custom user fields.

In your case you can try like this:

<ol><li>[types usermeta="care-cards" separator="</li><li>" user_current="true"][/types]</li></ol>

[types usermeta="care-cards" user_current="true" index="1"][/types]

More help:
https://toolset.com/documentation/user-guides/repeating-fields/
section "3. Displaying Repeating Fields"

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.