Skip Navigation

[Resolved] View output is not sorted as specified

This support ticket is created 4 years, 10 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
- 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)

This topic contains 2 replies, has 2 voices.

Last updated by ericE-4 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1536905
Screen Shot 2020-03-02 at 11.53.50 PM.png
Screen Shot 2020-03-02 at 11.54.01 PM.png
Screen Shot 2020-03-02 at 11.53.23 PM.png

For my custom post type "Lodges" I have a repeating field group containing the field "Species". I have a view that loops through each RFG and displays content from it including the field "Species". I have specified that the output should be sorted by field Species, ascending as a string.

This is not how the output is sorted.

The problem can be seen on this page: hidden link

The order should be:

Halibut
Rockfish
Salmon - Chinook
Salmo - Chum
Salmon - Coho
Salmon - Pink
Salmon - Sockeye
Trout - Cutthroat
Trout - Rainbow

Instead, this is the order:

Salmon - Chinook
Salmo - Chum
Salmon - Coho
Trout - Cutthroat
Halibut
Salmon - Pink
Trout - Rainbow
Rockfish
Salmon - Sockeye

#1537107

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I checked the problem URL post in the backend:
=> hidden link

I can see that within the "Fish Species" Repeating Field group, the Halibut is not the first entry. Halibut is set up as the 6th entry.

And with your view - to display the same order as per the Repeating field group, you should sort your view with the field "Field - toolset-post-sortorder" which I have set at Ordering section of your view.
=> hidden link

I can see on the frontend the repeating field group items are displayed as per the sort order set in the backend.
=> hidden link

More info:
=> https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups-in-custom-order

#1537831

Thanks. That's completely non-intuitive, so I couldn't have done it without your help.