<?php
/**
* shrk
* Generic loop for page sections  
*/

$single_section = false;
if ( function_exists('shrk_get_page_sections') ) {
    $sections = shrk_get_page_sections();
} else {
    return;
}

if ( is_singular('pagesections') ) {
	$single_section = true;
	$sections_arr = array( $post->ID );
}

?>

<?php if ( $sections_arr ) { ?>
	
	<div class="container-full container-sections">
		<div class="row sections">
			
			<?php do_action( 'shrk-pre-sections' ); ?>
			<?php shrk_get_sections( apply_filters( 'shrk_visible_sections', $sections_arr ) ); ?>
		
		</div>
	</div>

<?php } ?>