Query Database for all ACF repeater Datepickers and list them in order by date

This sample will query the database for the Custom Field of “birth”, a repeater date picker setup to show a persons birthday. It will pull all birthdays in the month of June and list them in order. This example will also pull the name field that is in the same repeater by referencing the postmeta ID of the row. This was adapted from the example on the ACF website.

You may have to change your table prefix and your field names.

Note: if you wanted to pull the current month, you could pass a php variable in to the query.

Leave a Reply

Your email address will not be published. Required fields are marked *

68 + = 71