<?php
/**
* Main Content Section
*
* This is the template for the content of main content section
*
* @package Theme Palace
* @subpackage Power News
* @since Power News 1.0.0
*/
if ( ! function_exists( 'power_news_add_main_content_section' ) ) :
/**
* Add main content section
*
*@since Power News 1.0.0
*/
function power_news_add_main_content_section() {

  power_news_render_main_content_section();
}
endif;

if ( ! function_exists( 'power_news_render_main_content_section' ) ) :
/**
* Start main content section
*
* @return string main content content
* @since Power News 1.0.0
*
*/
function power_news_render_main_content_section() {
  $options = power_news_get_theme_options();
  ?>
    <div id="inner-content-wrapper" class="wrapper">
      <div id="primary" class="content-area">
        <main id="main" class="site-main" role="main">

        <!-- Default layout -->
        <?php
        // Featured posts section
        require get_template_directory() . '/inc/sections/featured-posts.php'; 

        // Media posts section
        require get_template_directory() . '/inc/sections/media-posts.php';

        // Latest posts section
        require get_template_directory() . '/inc/sections/latest-posts.php'; 
        
        // Popular posts section
        require get_template_directory() . '/inc/sections/popular-posts.php';

        // Popular posts section
        require get_template_directory() . '/inc/sections/multiple-posts.php';
        ?>
        </main>
      </div><!-- #primary -->

      <?php if(is_active_sidebar('main-right-sidebar')): ?>
        <aside id="secondary" class="widget-area" role="complementary">

          <?php dynamic_sidebar( 'main-right-sidebar' ); ?>

        </aside><!-- #secondary sidebar -->
      <?php endif; ?>
    </div><!-- #inner-content-wrapper -->

  <?php }
  endif;