Skip Navigation

[Gelöst] User Field consecutive number

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

Is it possible to give an automatic consecutive number to the user fields if a new user created?

Solution:

You can use the WordPress user ID, it is a unique numeric value too, setup by WordPress automatically.

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-current-user

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

This support ticket is created vor 5 Jahren, 5 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

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

Zuletzt aktualisiert von alexd-6 vor 5 Jahren, 4 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1282717

Hey,

is it possible to give an automatic consecutive number to the user fields if a new user created? - I have one User Field.

thx - alex

#1282757

Dear alex,

I assume you are asking for a unique number value for each WordPress user.

If it is, you don't need custom user fields, and there isn't such a built-in feature within Toolset plugins.
Instead, you can the WordPress user ID, it is a unique numeric value too, setup by WordPress automatically.

For example, you can get current logged-in user's ID, with Views shortcode:
[wpv-current-user info="id"]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-current-user

If it is in a user's loop, you can get user's ID with shortcode:
[wpv-user field="ID"]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user

#1283733

My issue is resolved now. Thank you!