Support

Account

Home Forums Backend Issues (wp-admin) Created "Event" post type, how to sort by start date?

Unread

Created "Event" post type, how to sort by start date?

  • I’m using ACF to create templates for events (theater) for a local theater company. I have created the custom post type of “Plays” and adding new plays that are to premiere later this year (plus adding in old plays archived).

    I’ve seen posts previously about how to use custom fields as the “sort by” field for WordPress, but still not sure how to do it.

    I have one ACF as “Start Date” and another as “End Date”. On the pages that would show all plays in a given Season, which is basically a category, what code would I need and how would I add it? So for instance, on the “2021-22 Season” page, I’d want to show upcoming plays sorted at the top by the soonest… So if today is April, I want the May play at the top, then a July play, then August, etc. It would all be based on the “Start Date” field which is formatted as a date in ACF.

    I’m also using Elementor, so ideally I could select “Start Date” as an option within the Elementor “Post Grid” (or similar) widget. Thanks in advance!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.