<?php
/**
 * Template part for displaying posts
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package nb-foody
 */

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<div class="entry-content">
        <?php
        nbfoody_featured_thumb();
        nbfoody_get_categories();
        the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
        ?>
		<div class="entry-info">
			<?php 
			nbfoody_posted_on();
			 ?>
		</div>
		<?php
		if(nbfoody_get_options('nbcore_blog_archive_summary')):
		?>
			<div class="entry-text">
				<?php
				if(nbfoody_get_options('nbcore_excerpt_only')) :
					nbfoody_get_excerpt();
					echo '<div class="read-more-link"><a class="bt-4 nb-secondary-button" href="' . get_permalink() . '">' . esc_html__('View post', 'nb-foody') . '<span>&rarr;</span></a></div>';
				else :
					if ($wp_query->current_post == 0):
						the_content();
						wp_link_pages( array(
							'before' => '<div class="page-links ' . nbfoody_get_options('pagination_style') . '">' . esc_html__( 'Pages:', 'nb-foody' ),
							'after'  => '</div>',
							'link_before' => '<span>',
							'link_after' => '</span>',
						) );
					else:
						nbfoody_get_excerpt();
					endif;
				endif; ?>
			</div>
		<?php endif; ?>
	</div>
	
</article><!-- #post-## -->
