<?php
/**
 * Template part for displaying single posts layout two
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package benqu
 */

$authore_info_show = cs_get_option('authore_info_show');
$single_post_comment_disable = cs_get_option('single_post_comment_disable');
$related_post_disable = cs_get_option('related_post_disable');
$blog_tags = cs_get_option('blog_tags');
$blog_share = cs_get_option('blog_share');
$blog_nav = cs_get_option('blog_nav');
?>
<?php get_template_part('template-parts/single/single-two', 'top'); ?>
<div class="pfy_single_post_wrapper pfy-inter-wraap layout_two">
    <div class="container">
        <div class="row benqu-sticky-wrap">
            <div class="col-xl-8 benqu-sticky-item">
            <?php
            while ( have_posts() ) :
                the_post();?>
                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    <div class="entry-content">
                        <?php
                        the_content(
                            sprintf(
                                wp_kses(
                                    /* translators: %s: Name of current post. Only visible to screen readers */
                                    __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'benqu' ),
                                    array(
                                        'span' => array(
                                            'class' => array(),
                                        ),
                                    )
                                ),
                                wp_kses_post( get_the_title() )
                            )
                        );

                        wp_link_pages(
                            array(
                                'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'benqu' ),
                                'after'  => '</div>',
                            )
                        );
                        ?>
                    </div><!-- .entry-content -->

										<?php if(true == $blog_tags || function_exists('benqu_post_share')): ?>
											<footer class="entry-footer">
													<div class="row align-items-center">
															<div class="col-lg-6 col-6">
																	<?php if(true == $blog_tags){ benqu_entry_footer(); }?>
															</div>
															<div class="col-lg-6 col-6 text-end">
																	<?php
																			if(function_exists('benqu_post_share') && $blog_share != false){
																					benqu_post_share();
																			}
																	?>
															</div>
													</div>
											</footer><!-- .entry-footer -->
										<?php endif; ?>

                </article><!-- #post-<?php the_ID(); ?> -->

            <?php
								if(function_exists('benqu_single_post_pagination') && true == $blog_nav){
										benqu_single_post_pagination();
								}

								if(function_exists('benqu_theme_author_box') && true == $authore_info_show){
										benqu_theme_author_box();
								}

								// If comments are open or we have at least one comment, load up the comment template.
								if($single_post_comment_disable == true ){
										if ( comments_open() || get_comments_number()) :
												comments_template();
										endif;
								}

            endwhile; // End of the loop.
            ?>
            <?php
								if($related_post_disable == true){
										get_template_part('template-parts/related-posts');
								}
            ?>
            </div>
            <?php get_sidebar();?>
        </div>
    </div>
</div>