Skip Navigation

[Résolu] Create different lists (directories) of users based on the value specified in a custom field

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

Problem:

How to create different lists (directories) of users based on the value specified in a custom field?

Solution:

The Toolset user view does not support custom search form yet.

But it is possible to filter the result by view's shortcode attribute, for example:

https://toolset.com/forums/topic/create-different-lists-directories-of-users-based-on-the-value-specified-in-a-custom-field/#post-1975317

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#accessing-the-arguments

This support ticket is created Il y a 3 années et 9 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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 J S Il y a 3 années et 9 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1975233

J S

Thank you Luo! This is working now.

What would you recommend now for being able to create different lists (directories) of users based on the value specified in a custom field? I have a select field for each user called 'wpcf-aceer-role'. This field has several values (board member, intern, conservation fellow etc.). I would like to create pages for each of these types of users, i.e. a page for board members, a page for interns etc. On these pages, I want to link to the individual profile or author archives shown above.

I have a crude version of the complete user directory at this link: lien caché and the view profile link goes to the /author/username archive page as desired. I would like to either add a filtering option to the directory page (which I don't think is possible for user archives) or create several versions of the directory page, one for each user type.

What do you recommend for that?

Thank you!!

#1975317

Hello,

The Toolset user view does not support custom search form yet.

But it is possible to filter the result by view's shortcode attribute, for example:
1) You can create a view "my-view":
- Query users
- Filter by:
Select items with field:
wpcf-aceer-role is a string equal to VIEW_PARAM(aceerrole)
- In view's loop, display user information

2) Display above view's shortcode with different attribute "aceerrole" values, for example:

[wpv-view name="my-view" aceerrole="abc"]
...
[wpv-view name="my-view" aceerrole="efg"]

More help:
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#accessing-the-arguments

#1976907

J S

My issue is resolved now. Thank you!