Home Forums ACF PRO Event Date Guidance


Event Date Guidance

  • Hello – I’m looking for guidance on how I should setup some data and then display it in two different ways on the front end of my site.

    The data at the moment is very simple – I just want to be able to add Event dates using the date picker and add a simple text description for each event. My initial thought was to use ACF Pro and the Repeater field but it seems like it might not be a good option from a lot of issues I’ve come across in various threads for other folks. Having repeater is not necessary was just a nice visual touch when someone was adding a new event.

    For the two display options I’m going to have simple page that just lists every event that is upcoming or AFTER today’s date. So that when an event is in the past it is not displayed on the page.

    The second display would be in a CTA on the home page and possibly other pages that make it very easy for site visitors to see when the next event date is, just one.

    Can anyone suggest the best performance way to setup my data in ACF and possibly any suggestions for each view? I’ve tried creating a custom shortcode for the second display option but I can’t seem to find anyone that has figured out how to query a repeater sub field (event_date) to get the NEXT event date after today’s date.

    Appreciate any help

  • If I were going to create anything like the events you want to set up and I planned on sorting them or showing one of them or in any way outputting them in any way other than as entered in the repeater… I would create a custom post type.

    The CPT archive template would be used for showing the list, filtered to only show future dates and the single CPT template would show a single event.

  • Ah ok – that might make more sense. I was looking at it more like using ACF to capture the event date and description on an options page or something. Since it’s the same event every time, just the date changes and possibly a special guest or something to add to the description.

    I can do a CPT – and just add ACF fields to still capture the date and maybe pre-populate a post title and use the content as the description field. I’ll give that a whirl and see where I land. Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Event Date Guidance’ is closed to new replies.