Skip Navigation

[Waiting for user confirmation] Sorting the posts in a view based on a repeating field

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 1 reply, has 1 voice.

Last updated by Minesh 8 hours, 8 minutes ago.

Assisted by: Minesh.

Author
Posts
#2844441
Session Dates custom field.png
Upcoming Events view sort setting.png

Hi there,

We have a custom post type named "Event." It contains a custom field, "Session Dates," a date field which accepts multiple values. See "Session Dates custom field.png" for the field's definition.

We have a view named "Upcoming Events." We want to display a list of Event custom posts sorted by the *first* value of the "Session Dates" custom field. See "Upcoming Events view sort setting.png" for an excerpt of the view's definition. Is this possible? (I suspect we need some custom PHP to make this happen.)

Thank you.

Saul

#2844563

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I checked and I see ordering does works with the first entry of repeating field. It does seems to work and there is no additional code required.

You can cross-check and make sure it works for every aspsect.

However - I would like to know why you only want to compare the first entry?

Anoter approach is - maybe you should try to add a custom field like "Main/First Session Date" and use that field for comparision and add another field like "Secondary dates" will that work?