Skip to content

Instantly share code, notes, and snippets.

@antiden
Created January 9, 2017 07:05
Show Gist options
  • Save antiden/cf51a0528783d2f231708d7760902523 to your computer and use it in GitHub Desktop.
Save antiden/cf51a0528783d2f231708d7760902523 to your computer and use it in GitHub Desktop.
WP ACF Flexible Content
<?php if( have_rows('flexible_content_field_name') ): ?>
<?php while ( have_rows('flexible_content_field_name') ) : the_row(); ?>
<?php if( get_row_layout() == 'paragraph' ): ?>
<?php the_sub_field('text'); ?>
<?php elseif( get_row_layout() == 'download' ): ?>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment