<?php
/**
 * The main template for archive pages.
 *
 * Learn more: https://developer.wordpress.org/themes/basics/template-hierarchy/
 * @since 1.0
 * @package RoyalNews
 */
get_header(); ?>
<section class="site-content" id="site-content">
    <div class="container">
        <div class="royalnews-post-content-area">
            <div class="royalnews-post-content-wrapper">
                <main class="royalnews-post-content">
                    <?php if ( have_posts() ): ?>
                        <div class="royalnews-post-content-inner">
                            <?php while ( have_posts() ) : the_post();
                                get_template_part( 'templates/blog/blog', '' );
                            endwhile; ?> 
                        </div>
                    <?php else:
                        get_template_part( 'templates/blog/blog', 'none' );
                    endif; ?> 
                </main>
                <div class="royalnews-archive-post-navigator-wrap">                    
                    <?php royalnews_posts_navigator(); ?>
                </div>
            </div>
            <?php if( royalnews_value( 'enable_sidebar' ) ){ ?>
                <div class="royalnews-sidebar-content-wrapper">
                   <?php get_sidebar(); ?> 
                </div> 
            <?php } ?>
        </div>
    </div>
</section>
<?php get_footer() ?>