<?php
/**
 * The template for displaying all pages
 * @link https://codex.wordpress.org/Template_Hierarchy
 * @since 1.0
 * @package RoyalNews
 */
get_header();?>
    <section class="site-content" id="site-content">
        <div class="container">
            <div class="row">
                <?php do_action( 'royalnews_page_before_content' ); ?>
                <main id="main" class="site-main ">
                    <?php if ( have_posts() ): ?>
                        <div class="royalnews-single-inner">
                            <?php while ( have_posts() ) : the_post();?>
                                <?php if( has_post_thumbnail() ): ?>
                                    <div class="royalnews-single-thumbnail">
                                        <?php the_post_thumbnail( 'full' ); ?>
                                    </div>
                                <?php endif; ?>
                                <div class="royalnews-single-content-wrap">
                                    <?php royalnews_the_category(); ?>
                                    <h2 class="royalnews-post-title">           
                                        <?php the_title(); ?>
                                    </h2>
                                    <div class="royalnews-single-content">
                                        <?php the_content(); ?>   
                                    </div>
                                </div>
                            <?php endwhile; ?>
                        </div>
                    <?php endif; ?>
                </main>
                <?php do_action( 'royalnews_page_after_content' ); ?>
                <?php if( royalnews_value( 'enable_sidebar' ) ){ ?>
                    <div class="royalnews-sidebar-content-wrapper">
                       <?php get_sidebar(); ?> 
                    </div>  
                <?php } ?>

            </div>
        </div>
    </section>
<?php get_footer() ?>