Sauter la navigation

[Résolu] User Field consecutive number

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 5 années et 8 mois. 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)

Marqué : ,

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par alexd-6 Il y a 5 années et 8 mois.

Assisté par: Luo Yang.

Auteur
Publications
#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!