<?php


if ( have_posts() ) :
    while ( have_posts() ) : the_post();

        if( have_rows('page_sections') ):
            while ( have_rows('page_sections') ) : the_row();

                $layout = get_row_layout();
                get_template_part('template-parts/sections/' . str_replace('_', '-', $layout));

            endwhile;
        endif;

    endwhile;
endif;
