<?php
/*
 * style five template
*/
?>
<div class="eblog-row">
<?php 
    if ( $posts_query->have_posts() ):
    while ( $posts_query->have_posts() ): $posts_query->the_post();

    ?>
    <div class="eblog-col-lg-<?php echo esc_attr( $settings[ 'layout' ] ); ?> eblog-col-sm-6">
        <div class="eblog-single-inner style-10">
            <div class="icon-img">
                <?php the_post_thumbnail(); ?>
            </div> 
            <div class="content-box">

            <?php 

            //check if not hide title
            if( 'hide' != $settings[ 'dtitle' ] ) :

            ?>
            <<?php echo esc_attr( $settings[ 'titltag' ] ); ?> class="inner-title">

            <a href="<?php the_permalink(); ?>">

                <?php
                 if( 'full' == $settings[ 'dtitle' ] ) :

                  the_title();

                  else :
                    echo wp_trim_words( get_the_title(), $settings[ 'title_excerpt_length' ], '' );
                 endif;
                 ?>
                    
            </a>

            </<?php echo esc_attr( $settings[ 'titltag' ] ); ?>>

            <?php endif; // end title  ?>

                <div class="e-book-author-inner">
                   <?php echo get_avatar( get_the_author_meta( 'ID' ) , 45 ); ?>
                    <div class="author-details">
                        <p><?php the_author(); ?></p>
                        <span><?php the_time( get_option( 'date_format' ) ); ?></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php endwhile; wp_reset_postdata(); endif; ?>
</div>