Home › Forums › Add-ons › Repeater Field › Filter through repeater rows by meta field value › Reply To: Filter through repeater rows by meta field value
Add a field to the row identifying which year it belongs to, then add a condition in your loop checking this field against the current year being displayed.
Or if you already know which rows you want based on other criteria, then you won’t need the extra field, just a conditional check at each iteration of your loop.
If you need to know which row you’re currently on, you can use get_row_index() to obtain its index.
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.