Skip to content

Instantly share code, notes, and snippets.

@FuruholmAnton
Created August 18, 2016 15:37
Show Gist options
  • Save FuruholmAnton/f7dba1526131fee719d1adb834475c0b to your computer and use it in GitHub Desktop.
Save FuruholmAnton/f7dba1526131fee719d1adb834475c0b to your computer and use it in GitHub Desktop.
<?php
// Check if the flexible content field has rows of data:
if (have_rows('sections')):
// Loop through the rows of data:
while (have_rows('sections')) : the_row();
// Load the corresponding template file:
include(locate_template('templates/'.get_row_layout().'.php'));
endwhile;
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment