Skip Navigation

[Resolved] Does the sort functionality sort all the results in the database?

This support ticket is created 5 years 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 – 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)

This topic contains 5 replies, has 3 voices.

Last updated by Luo Yang 5 years ago.

Assisted by: Luo Yang.

Author
Posts
#1430783

Dear Yang,
(apologies if I got your incorrect name).

My second question is on sorting:

I must be doing something wrong there as well. As far as I can tell - it's not sorting by the custom fields in the database. If I attempt to sort by a custom field as a string, it shows this:

Sorting by the City column:
hidden link

Sorting by the zip code field (asc):
hidden link

And sort by zip desc:
hidden link

The zip is setup as a numeric search.

What am I doing wrong here?

My last question:
Does the sort functionality sort all the results in the database? Or does it just sort what's on the screen?

Thank you for your help! It is huge,
T

#1430787

Dear T,

The problem you mentioned above is abmormal, please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again

2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1436719

Yang,

OK good news - I got it to work. The issue was that my custom fields are regular (non-Toolset) custom fields. And the wpv-header tags were linking to Toolset custom fields, so I updated those table column headers and that works.

However my next question - Is there a way to simply edit the sort without having to regenerate the entire sort code every time? (I have 21 columns I have to sort by so it's a little taxing to rebuild it every time). When I click on "Sorting Conrols" when editing the view, it doesn't let me edit what I've already created, it only regenerates a new sort dropdown.

Is there anyway to edit an existing sort control?
T

#1436721

Yang,
The other thing that would save me on the last question - Is it possible to set the sort type (either numeric / string, etc) in the wpv-heading shortcode? I don't see that functionality...

#1437979

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Luo is on holiday today. He will get in touch with you as soon as he will get back to work.

#1440619

Q1) Is there anyway to edit an existing sort control?
I assume we are talking about the shortcode [wpv-sort-orderby], if it is, you can find and edit that shortcode manually, and there isn't existed document for this shortcode, so it might conduct some unexpected results to change the shortcode manually.
And there is a document for setup the sort control within GUI:
https://toolset.com/documentation/user-guides/views/allowing-visitors-to-sort-the-front-end-results/

Q2) Is it possible to set the sort type (either numeric / string, etc) in the wpv-heading shortcode?
Unfortunately, there isn't such a built-in feature, see our document:
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-heading
You can add a feature request for it, our developers will evaluate it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/