I am trying to: Make a sortable table
Link to a page where the issue can be seen: It's still under development, but you can see a screenshots.
I expected to see:
The table header should have sortable icons but it's not showing. I'm trying to display a list of all members. I followed the instructions here:
https://toolset.com/documentation/user-guides/view-layouts-101/#grid
https://toolset.com/documentation/user-guides/allowing-visitors-to-sort-the-front-end-results/
I'm stuck at "How to Add Sorting Controls" step. I could not find "Sorting controls button" in "Filter Editor". Please advise.
Hello, thank you for contact us. I will try to do my best to help you.
Sort user is limited due to WordPress core limitation. Actually, the only fields that can be sorted are the User Login, User Email, Registration Date and fields that are included in the wp_users table. But the metadata included in wp_usersmeta table can't be sorted by default, like First Name, and so on. I see that one of the problems is that the sort icons are not appearing in your site. Have you checked the option "Make this table sortable by columns" when you created the view? (Check screenshot here). Also, are you using one of the user fields that can't be sortable by default?
In case that you don't know how to answer this question, I would like to ask you for temporary access to your site dashboard. You can share privately your credentials with me in the next answer.
Finally, if you want to make the others fields sortable, you need to add some custom code. Please, check the solution proposed in this message https://toolset.com/forums/topic/sort-user-view-by-users-last-name-of-custom-field/#post-364237
Have a great day.
Thanks for your replay. I did clicked on "Make this table sortable by columns". From what I understand, it does not work out of box when it's for users? If I want to make custom fields in users, the link you sent will work?
I can't find where I could make this message private.
Hello again, sorry I didn't enable private reply previously, you should be able to share the credentials safely now.
Regarding your questions, the option "Make this table sortable by columns" works with some user fields, but not with custom user fields as explained in the message above. The link that I sent you is an example of an user that has a similar issue like yours.
Please, share the access to your site and I will take a look, thanks.
Hello again, I tried to enter the site but it's password protected. Could you also share the username and password? I have enabled private reply again.
Thank you.
Hi,
Still waiting for your reply.
Hi,
I'm sorry for this delay, actually, Jose is not a part of Toolset now and somehow we lost the notifications of this ticket.
I will check the ticket and get back to you ASAP.
Thanks.
Hi Yuli,
It seems that you are trying to add the sorting controls for fields that are not created using Types.
This functionality is only available for the fields created by Types. fields are generated by other plugins can't like ACF can't be used as sorting control.
To be able to do so with fields that created by another plugin, please try the following:
Go to Toolset> User fields
Click the button "User Field Control"
Look for the field that you want to use as a sorting control
Click manage with Types for this field
Go to your View, use the wizard to create the sortable table
I hope that this helps you.
Thanks.