Home › Forums › Add-ons › Repeater Field › Using get_post_meta as Fallback on Repeaters › Reply To: Using get_post_meta as Fallback on Repeaters
Wow you do know your stuff! – Many thanks that works perfectly, the only thing that i don’t grasp 100% is
$row_count--;
I do understand by its use we are moving from zero based index to get the last proper row.
You said earlier that:
$rows--;
is short form of $rows = $rows-1;
So in the code that works, instead of using $row_count--;
i tried $row_count-1;
but that outputs nothing, I was wondering for my own curiousity how to use arithmetic operator on the row count so for instance I could output the 2nd last one.
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!
ACF’s Repeater field is a versatile solution for repeating content in #WordPress.
— Advanced Custom Fields (@wp_acf) December 29, 2022
What’s your favorite use case for the Repeater field?
What’s the weirdest thing you’ve ever used it for?
Let us know!👇
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.