<div id="main-post-wrapper" class="wrapper relative page-section same-background" style="transform: none;">

    <?php if ( is_active_sidebar( 'main-post-left-sidebar' ) ) { ?>
        <aside id="secondary" class="widget-area left-sidebar" role="complementary">
            <?php
                dynamic_sidebar( 'main-post-left-sidebar' );
            ?>
        </aside>
    <?php } ?>

    <div id="primary" class="content-area">
        <main id="main" class="site-main" role="main">
            
            <?php  

                $inner_sections = array( 'business-news', 'travel-news' );

                if ( !empty( get_theme_mod( 'moral_magazine_homepage_inner_section_sortable' ) ) ) {
                    $inner_sections = get_theme_mod( 'moral_magazine_homepage_inner_section_sortable' );
                }

                foreach ( $inner_sections as $section ) {
                    get_template_part( 'template-parts/frontpage-parts/' . $section ); 
                }
                
            ?>

        </main><!-- #main -->
    </div><!-- #primary -->

    <?php if ( is_active_sidebar( 'main-post-right-sidebar' ) ) { ?>
        <aside id="secondary" class="widget-area right-sidebar" role="complementary">
            <?php
                dynamic_sidebar( 'main-post-right-sidebar' );
            ?>
        </aside>
    <?php } ?>
</div>