<?php

/**
 * The template for displaying single gallery post format posts.
 *
 * @package chained
 * @since chained 1.0.0
 */

if ( !defined( 'ABSPATH' ) ) {
    exit;
    // Exit if accessed directly
}

?>

<article id="post-<?php 
the_ID();
?>" <?php 
post_class();
?>>
	<?php 
?>
		<?php 

if ( function_exists( 'sharing_display' ) && !is_attachment() ) {
    ?>
			<div class="content-with-socials">
				 <?php 
    sharing_display( '', true );
    ?>
				<div class="content-and-image">
					<header class="entry-header">
						<div class="entry-meta">
							<?php 
    if ( false == get_theme_mod( 'chained_single_hide_categories', false ) ) {
        echo  chained_cats_list() ;
    }
    if ( function_exists( 'breadcrumb_trail' ) && true == get_theme_mod( 'changed_global_enable_breadcrumb', true ) ) {
        breadcrumb_trail();
    }
    ?>
						</div><!-- .entry-meta -->
						<?php 
    the_title( '<h1 class="single-entry-title">', '</h1>' );
    ?>
						<div class="entry-posted-on">
							<?php 
    chained_posted_on();
    ?>
						</div>
					</header><!-- .entry-header -->
					<?php 
    chainged_show_entry_gallery();
    ?>
					<div class="entry-content" itemprop="text">
						<?php 
    the_content();
    ?>
						<?php 
    wp_link_pages( array(
        'before' => '<div class="page-links">' . __( 'Pages:', 'chained' ),
        'after'  => '</div>',
    ) );
    ?>
					</div><!-- .entry-content -->
				</div> <!-- .content-and-image -->
			</div> <!-- content-with-socials -->
		<?php 
} else {
    ?>
			<header class="entry-header">
				<div class="entry-meta">
					<?php 
    echo  chained_cats_list() ;
    ?>
					<?php 
    if ( function_exists( 'breadcrumb_trail' ) ) {
        breadcrumb_trail();
    }
    ?>
				</div><!-- .entry-meta -->
				<?php 
    the_title( '<h1 class="single-entry-title">', '</h1>' );
    ?>
				<div class="entry-posted-on">
					<?php 
    chained_posted_on();
    ?>
				</div>
			</header><!-- .entry-header -->
			<?php 
    chainged_show_entry_gallery();
    ?>
			<div class="entry-content" itemprop="text">
				<?php 
    the_content();
    ?>
				<?php 
    wp_link_pages( array(
        'before' => '<div class="page-links">' . __( 'Pages:', 'chained' ),
        'after'  => '</div>',
    ) );
    ?>
			</div><!-- .entry-content -->
		<?php 
}

?> <!-- end sharing if -->
	<?php 
?> <!-- end freemius if -->
	<footer class="entry-footer">
		<?php 
chained_single_entry_footer();
?>
	</footer><!-- .entry-footer -->
</article><!-- #post-## -->