rspisarski
10/2/2017 - 1:13 PM

Flexible Layout

Flexible Layout

Partials = Folder
stripe = file name
layout-item = file name

stripe-layout-item.php
<?php

    // check if the flexible content field has rows of data
    if( have_rows('flexible_layout') ):

      // loop through the rows of data
      while ( have_rows('flexible_layout') ) : the_row();

          // Layout Item
          if( get_row_layout() == 'layout_item' )
          get_template_part('partials/stripe', 'layout-item');

      endwhile;

  endif;
?>