I want to create something looking like an agenda with cpt & acf.
I have create a Custom post Type “Agenda” with an ACF date picker “date_agenda” to select future dates for my events.
I want on my home page, the 2 next futures events of my agenda.
For example :
Event 1 = january 1st
Event 2 = April 10th
Event 3 = August 1st
Event 4 = September 1st
Event 5 = November 1st
Today, we are July the 6th, so I want on my home page event 3 & 4
and after August 1st, it was automatically event 4 & 5 on my home page.
Is it possible ?
You can always query the custom post type based on the custom fields. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/. Please learn the query parameters here: https://codex.wordpress.org/Class_Reference/WP_Query.
I hope this helps 🙂