<?php get_header(); ?>

<section class="main-body">
<div class="container">
	<div itemscope itemtype="http://schema.org/WebPage" id="crumbs" class="breadcrumb">
	</div>    
    <div id="primary" class=" <?php if( get_theme_mod( 'siderbar_layout','right-sidebar') != 'no-sidebar'){echo 'col-md-8';}?>  primary essays-list">
    	<div class="article">
            <ul> 
         	<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>           

            	<li id="post-5123" class="group">
                	<?php 
                    	if(has_post_thumbnail())
                    	{
					?>
					<div class="col-xs-12 col-md-4">
				   		<a href="<?php the_permalink(); ?>" class="ct_post_thumbnail" >
                            <div class="thumb">
								<?php 
                                	the_post_thumbnail( array(185, 135) );
								?>
                                <div class="cat"></div>
                            </div>
						</a>
					</div><!--div class="col-xs-12 col-md-4"-->
                    <?php 
						}else{
							$exclude_id = get_the_ID();
							$arr = texas_get_thumbnail($exclude_id);
							if($arr['fullpath'] !=''){
					?>
					<div class="col-xs-12 col-md-4">
				   		<a href="<?php the_permalink(); ?>" class="ct_post_thumbnail" >
                            <div class="thumb">
                                <img src="<?php echo esc_url($arr['fullpath']);?>"  />  
                                <div class="cat"></div>
                            </div>
						</a>
					</div><!--div class="col-xs-12 col-md-4"-->
                    <?php 
							}
						}
					?>                    
                    
					<div class="item-main col-xs-12 col-md-8 ">
                        <div class="title">
                            <h2>
                                <a href="<?php the_permalink();?>"><?php esc_html(the_title()); ?></a>
                            </h2>
                        </div>
                        
                        <div class="meta">
                            <div class="excerpt">
                                <?php the_excerpt(); ?>
                            </div>
                            <div class="data pull-left">
                                <time class="time">
                                    <i class="uicon-calendar"></i> <em><?php the_time(get_option( 'date_format' ));?></em>
                                </time>
                                <span class="view">
                                    <i class="uicon-see"></i> <em><?php the_author_link(); ?></em>
                                </span>
                            </div>
                        </div>
					</div><!--div class="item-main col-xs-12 col-md-8 "-->

				</li>

         	<?php endwhile;endif; ?>                
                
            </ul>
            
            <nav class="page-nav page-nav-default">
		  		<div class="pages">        
				<?php the_posts_pagination( array( 'mid_size' => 2, 'screen_reader_text' => '' ) ); ?>
               	</div>
          	</nav>

        </div><!--div class="col-md-8 article"-->

 	</div><!--div id="primary" class=" primary essays-list"-->
    
    <?php if( get_theme_mod( 'siderbar_layout','right-sidebar') != 'no-sidebar'){get_sidebar();}?>

    <p class="clear"></p>
</div><!--div class="container"-->
</section><!--section class="main-body"-->
            
<?php get_footer(); ?>