<?php
/**
 * Template part for displaying posts
 *
 */

?>
<div class="bexplore-masonry-item">
    <div class="bexplore-post-wrapper">
        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

            <div class="bexplore-post-thumbnail">
				<?php
				if ( has_post_thumbnail() ) {
					bexplore_post_thumbnail();
				}
				?>
            </div>
            <div class="bexplore-post-content">
                <header class="bexplore-header-content entry-header">
					<?php

					if ( 'post' === get_post_type() ) :
						?>
                        <div class="entry-meta">
                            <ul>
                                <li>
									<?php
									bexplore_posted_by(); ?>
                                </li>
                                <li>
									<?php
									bexplore_posted_on(); ?>
                                </li>
                                <li>
									<?php
									if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
										bexplore_comment_by();
									}
									?>
                                </li>
                            </ul>
                        </div><!-- .entry-meta -->
					<?php endif;
					if ( is_singular() ) :
						the_title( '<h1 class="entry-title">', '</h1>' );
					else :
						the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
					endif;
					?>
                </header><!-- .entry-header -->
                <div class="bexplore entry-content">
					<?php

					the_excerpt();

					if ( ! is_single() ):
						?>
                        <p><a class="read-more-btn"
                              href="<?php the_permalink(); ?>"><?php echo esc_html__( 'Read More', 'bexplore' ); ?><i
                                        class="fas fa-chevron-right"></i></a></p>
					<?php
					endif;
					wp_link_pages(
						array(
							'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'bexplore' ),
							'after'  => '</div>',
						)
					);
					?>

                </div><!-- .entry-content -->
            </div>
        </article><!-- #post-<?php the_ID(); ?> -->
    </div>
</div>