Skip Navigation

[Resolved] Sortable table don't sort functions

This support ticket is created 6 years, 8 months ago. 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 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 7 replies, has 3 voices.

Last updated by Mohammed 6 years, 7 months ago.

Assisted by: Mohammed.

Author
Posts
#623538
Screen Shot 2018-03-09 at 12.53.08 PM.png
Screen Shot 2018-03-09 at 12.47.29 PM.png
Screen Shot 2018-03-09 at 12.47.05 PM.png
Screen Shot 2018-03-09 at 12.47.15 PM.png

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.

#623666

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.

#623789

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.

#624353

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.

#625390

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.

#630351

Hi,

Still waiting for your reply.

#632377

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.

#632520

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.