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

?>

<article id="post-<?php the_ID(); ?>" <?php post_class('col-md-4 col-sm-6 col-xs-12'); ?>>
	<div class="single-blog">
		<?php bizconsulting_post_thumbnail(); ?>
		<div class="blog-content">
		   <div class="blog-title">
				<?php if ( 'post' === get_post_type() ) :
					?>
					<div class="blog-meta">
						<?php
							bizconsulting_posted_on();
							bizconsulting_posted_by();
						?>
					</div><!-- .entry-meta -->
				<?php endif; ?>
				<?php
					if ( is_singular() ) :
						the_title( '<h1 class="entry-title">', '</h1>' );
					else :
						the_title( '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark"><h4 class="entry-title">', '</h4></a>' );
					endif;
				?>
			</div>
			<div class="blog-text">
				<?php
				if( !is_singular() ){
					the_excerpt();
					?>
					<a class="blog-btn" href="<?php esc_url(the_permalink());?>"><?php echo esc_html('Read more');?></a>
					<?php
				}else{
					the_content( sprintf(
						/* translators: %s: Name of current post. */
						wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'bizconsulting' ), array( 'span' => array( 'class' => array() ) ) ),
						the_title( '<span class="screen-reader-text">"', '"</span>', false )
					) );
					wp_link_pages( array(
						'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'bizconsulting' ),
						'after'  => '</div>',
					) );
				}
				?>
			</div>
		</div>
	</div>
</article><!-- #post-<?php the_ID(); ?> -->
