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

$theme_options = omag_theme_options();

?>

<div class="col-lg-6">
	<article class="post type7">

		<?php if ( has_post_thumbnail() ) {  ?>

		<figure>

			<?php omag_post_thumbnail(); ?>

			<?php if( 1 === $theme_options['enable_post_tags']) {
				omag_posts_tag();
			} ?>
			
		</figure>

		<?php } ?>

		<div class="article-content">
			<div class="entry-header">
				<h4>
					<a href="<?php the_permalink(); ?>">
						<?php the_title(); ?>
					</a>
				</h4>
				<div class="banner-info">
					<?php
						if( 1 === $theme_options['enable_post_author']) {
                		omag_posted_by();
            		} 
            		?>

            		<?php
						if( 1 === $theme_options['enable_post_category']) { ?>

            		<span>-</span>
					<?php omag_posts_category(); ?>
					
					<?php } ?>
				</div>
				<div class="entry-meta">
					<?php
						if( 1 === $theme_options['enable_post_date']) {
                			omag_posted_on();
            			}
            		?>

            		<?php
            			if( 1 === $theme_options['enable_comments_count']) {
            				echo '<span class="comments-link">';
            				echo '<i class="far fa-comments"></i>';
            				comments_popup_link( esc_html__( 'No Comments', 'omag' ), esc_html__( '1 Comment', 'omag' ), '% '. esc_html__( 'Comments', 'omag' ), 'post-comments');
            				echo '</span>';
            			}
        			?>
				</div>
			</div>
			<div class="entry-content">
				<p> <?php the_excerpt(); ?> </p>
			</div>
		</div>
	</article>
</div>
