<?php
// Do not allow direct access to the file.
if( ! defined( 'ABSPATH' ) ) {
    exit;
}
/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package score
 */

?>

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

	<header class="entry-header">
		<?php
		if ( has_post_thumbnail() and !get_theme_mod('hide_featured') and is_singular() ) { ?>
			<div class="post-thumb-featured">
				<?php the_post_thumbnail( 'post-thumbnail', array( 'itemprop' => 'image' ) ); ?>
			</div>
		<?php } ?>
		<?php
		if ( is_singular() ) :
			the_title( '<h1 class="entry-title">', '</h1>' );
		else :
		    ?>
				<div <?php echo live_news_animation_calender (); ?> class="c-calender">
					<div class="s-month"><?php echo esc_html( get_the_date( 'M' ), 'live-news' ); ?></div>
					<div class="s-year"><?php echo esc_html( get_the_date('Y'), 'live-news' ); ?></div>
					<div class="s-line"></div><div class="s-0"></div>
					<div class="s-line1"></div><div class="s-01"></div>
					<div class="s-date"><?php echo esc_html( get_the_date('j'), 'live-news' ); ?></div>
				</div>
			<?php
			the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
		endif;
?>
	</header>
	<?php if ( (is_front_page() || is_home() || is_category() || is_archive() || is_page_template('template-blog.php')) and (!is_page_template( 'templeat-full-width.php'))) : ?>
 
		<?php if ( has_post_thumbnail() ) { ?>
		<a class="app-img-effect" href="<?php the_permalink(); ?>">	
			<div class="app-first">
				<div class="app-sub">
				<div class="hover-eff">
					<div class="fig">

						<?php the_post_thumbnail( 'post-thumbnail', array( 'itemprop' => 'image' ) ); ?>		
						
					</div>
				</div>
				</div>
			</div>
		</a> 
	
		<?php } ?>
		
	<?php the_excerpt();  ?>
	
	<?php else : ?>

	<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>', 'live-news' ),
				array(
					'span' => array(
						'class' => array(),
					),
				)
			),
			get_the_title()
		) );

		wp_link_pages( array(
			'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'live-news' ),
			'after'  => '</div>',
		) );
		?>
	</div><!-- .entry-content -->
<?php endif; ?>
		<footer class="entry-footer">
		<?php if ( 'post' === get_post_type() ) { ?>
			<div <?php echo live_news_animation_calender (); ?> class="entry-meta">
				<?php
				$live_news_categories_list = get_the_category_list( esc_html__( ', ', 'live-news' ) );
				if ( $live_news_categories_list ) {
					/* translators: 1: list of categories. */
					echo '<span class="news-cate cat-hide"><span class="dashicons dashicons-portfolio"></span> <span class="cat-links  "></span>'. $live_news_categories_list.'</span>' ;  // WPCS: XSS OK.
				}
				live_news_posted_by();
				live_news_entry_footer(); 
				?>
			</div><!-- .entry-meta -->
		<?php } ?>	


	</footer><!-- .entry-footer -->		
</article>
