Home › Forums › Add-ons › Flexible Content Field › Can only output 6 layouts from my Flexible Content field › Reply To: Can only output 6 layouts from my Flexible Content field
My code is a series of if statements in a while loop. I’m not using any elseif
<?php if( have_rows('universal') ): ?>
<?php while( have_rows('universal') ): the_row(); ?>
<?php if( get_row_layout() == 'text' ): ?>
//output
<?php endif; ?>
<?php if( get_row_layout() == 'cards' ): ?>
//output
<?php endif; ?>
+ 6 more of these each querying a different layout
<?php endwhile; ?>
<?php endif; ?>
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.