Home › Forums › ACF PRO › Display data from specific repeater row › Reply To: Display data from specific repeater row
There is only one way to do this using acf functions. That is to loop through the repeater and output the row or field that your looking for. This can be done with counters
if (have_fields('repeater')) {
$counter = 0;
while (have_rows('repeater')) {
the_row();
$counter++;
// at this point the counter is set to the current row
// you can output content or not based on that row
// for example
if ($row == 4) {
// output content from row 4
}
}
}
You can also check values of the fields in the row to see if you want to show that row.
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.