Home › Forums › Add-ons › Repeater Field › Repeater field with IF/ELSE based on sub_field value › Reply To: Repeater field with IF/ELSE based on sub_field value
If I just run this:
if (have_rows('row_order_and_qty')) {
while(have_rows('row_order_and_qty')){ the_row();
$post_type = get_sub_field('content_type'); echo $post_type;
$posts_per_page = get_sub_field('items_per_row'); echo $posts_per_page;
to show the ACF values.. I get the correct values:
inventory4 auction8 liquidation4 studies8
Something happens when this code is used in a loop or something. I’ve never seen this before, it usually just works LOL
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.