Home › Forums › Add-ons › Repeater Field › Hide repeater block after expired date › Reply To: Hide repeater block after expired date
I’m going to need more to work with.
I assume you have a repeater and you have a sub field that indicates the end date. You did not give the name of this field.
This is checking the date field you included in OP
if (get_sub_field('date', false, false) > date('Ymd')) {
You need to change the field name in this if statement to your end date field name
There would be almost no way to do this without it except to maybe do something like
if (get_sub_field('date', false, false) > date('Ymd', strtotime('+1 day'))) {
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.