Skip Navigation

[Résolu] Creating a List/Archive/Directory Page of Users with Filters

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

Problem:
Creating a List/Archive/Directory Page of Users with Filters

Solution:
You can not create custom search view for taxonomy or user views as its not supported natively. You can create custom search views for post type and post type archives.

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/creating-a-list-archive-directory-page-of-users-with-filters/#post-1967985

Relevant Documentation:

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Marqué : ,

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

Dernière mise à jour par J S Il y a 3 années et 9 mois.

Assisté par: Minesh.

Auteur
Publications
#1967349

J S

Tell us what you are trying to do?

I would like to create a page that lists all WordPress users with certain credentials on our site. For example, I've added custom fields to the WordPress user profiles that are viewable and editable in the admin. I would like to create an archive or user directory page that lists all of the users on our site that have a custom field in the admin set to "display in user directory" radio button value of yes. Default for this button will be yes. This will allow me to hide certain users from the directory page by toggling this field on/off in the admin.

On this user directory or archive page that lists our users, I would like show a filterable list of all users, and different sections on the first display of the page. For example, first, I may list a section of "board members" which is a selection of a custom field called "affiliation", then a section containing "conservation fellows", another selection of the "affiliation" field, then "interns", "staff" and so forth but display these each in different sections on the initial load of the directory page. Not sure if this will require separate loops to run for each section or not?

The big issue is that for me, in my installation, I do not seem to have access to create archives or relationships for "users" in any of the Toolset tools, thus I cannot figure out how to even create a view or content template or anything to build a page that shows a list of users as described above.

For each user on the user directory page described above, I would like to display their profile picture, name, and other fields, and the name is clickable so that it can link to the single user archive page where I show more detailed information about each user and their posts and other CPTs, if they have any.

So, how can I best create this user directory page? My working site is at lien caché

Thanks
Jordan

#1967915

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

It seems you have multiple queries but we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery for the original issue reported. Please kindly open a new ticket with every new question you may have. I hope this makes sense and thank you for understanding.

As I understand, you want to have a view where you can filter your users with the custom user fields. If this is correct:
- You can not create custom search view for taxonomy or user views as its not supported natively. You can create custom search views for post type and post type archives.

#1967963

J S

Thank you Minesh but this is really just one question with several parts. The parts will not make sense out of context of the main question. I do understand that user views is not supported natively so how can I use toolset to accomplish my goal one way or another of have a user directory? There must be some way to make this happen? Thanks

#1967985

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

I mentioned that frontend filters (custom search) view is not supported, if you want to add "Query Filter" for the custom field where its possible.

I would like to create a page that lists all WordPress users with certain credentials on our site. For example, I've added custom fields to the WordPress user profiles that are viewable and editable in the admin. I would like to create an archive or user directory page that lists all of the users on our site that have a custom field in the admin set to "display in user directory" radio button value of yes. Default for this button will be yes. This will allow me to hide certain users from the directory page by toggling this field on/off in the admin.
===>
You can list all users using classic views and you can filter with the custom radio field 'Yes'. This can be achieved.

On this user directory or archive page that lists our users, I would like show a filterable list of all users, and different sections on the first display of the page. For example, first, I may list a section of "board members" which is a selection of a custom field called "affiliation", then a section containing "conservation fellows", another selection of the "affiliation" field, then "interns", "staff" and so forth but display these each in different sections on the initial load of the directory page. Not sure if this will require separate loops to run for each section or not?
===>
Considering that you want to filter the user list with different custom fields, yes, it could be achieved but we will require here different views per section. But I can able to tell you the best optimized way once you can share all your required sections you want to display with what fields and what field options.

The big issue is that for me, in my installation, I do not seem to have access to create archives or relationships for "users" in any of the Toolset tools, thus I cannot figure out how to even create a view or content template or anything to build a page that shows a list of users as described above.
===>
There is no way to create post relationship with users. Only post type relationship is possible (one-one, one-many,many-many).

I'm not sure why you want to create relationship for users and what is your need but Please check the following Doc:
- https://toolset.com/documentation/legacy-features/views-plugin/how-to-create-custom-searches-and-relationships-for-users/

I'm not sure about your setup yet, what plugins you installed. Toolset Blocks or Toolset views?

if you are using Toolset Bocks then you need to switch to Classic views as using Classic views only you can create taxonomy/user kind views. To switch to classic views you should navigate to:
Toolset => Settings => General tab => Editing experience => and select the option "Show both the legacy and Blocks interface and let me choose which to use for each item I build" and refresh the page

You will now see submenu Views added under Toolset menu.

For each user on the user directory page described above, I would like to display their profile picture, name, and other fields, and the name is clickable so that it can link to the single user archive page where I show more detailed information about each user and their posts and other CPTs, if they have any.
===>
Please check the following Doc:
https://toolset.com/documentation/customizing-sites-using-php/creating-custom-user-profiles/

#1973795

J S

My issue is resolved now. Thank you!