<?php

/**
 * Theme Name: ESchool
 * Theme URI: http://demo.com/eschool
 * Author: demo.com
 * Author URI: http://demo.com
 * Description: Themes Is WordPress Theme Market
 * @package eschool
 */
get_header();
global $codedokan;
?> 


                    
                            
                	 <!--===================== Single page start ======================= -->
            
    <section class="single-page">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-md-8">
                   
				   <?php $image = wp_get_attachment_url( get_post_thumbnail_id($post->ID)); if($image){?>
				   
                        <div class="single-pageImage">
                            <img src="<?php echo $image; ?>" alt="">
                        </div>
				   <?php } ?>
                         <div class="single-page-content">
                        <div class="single-page-date">
                            <ul>
                               	<li><a href=""> <i class="fas fa-calendar-alt"></i> <?php echo get_the_time("j F Y"); ?> </a></li>
								<?php $author_name = get_post_meta(get_the_ID(),'author_name', true);
																if($author_name){ ?>
								<li><a href=""> <i class="fas fa-user"></i> By <?php echo $author_name; ?> </a></li>
								<?php } ?>
                                
                            </ul>
                        </div>
                        
                        <div class="single-page-title">
                            <?php the_title() ?>
                        </div>
                        
                        
                        <div class="singel-details">
                             <?php echo the_content();?>
                        </div>
                        
                        
                    </div>
                    
                </div>
                <div class="col-lg-4 col-md-4">
                   
         <?php if ( ! dynamic_sidebar( 'sidebar_widget' ) ): ?>  
            <?php dynamic_sidebar('sidebar_widget')?>
           <?php endif; ?>
           
                    
                     <div class="single-cat-wrpp">
                        <h3 class="single-cat-title">
                             <?php echo $codedokan['recent_blog'];?>
                        </h3>
                        
                        <div class="single-categoris">
                            <ul>
							<?php
										$how = $codedokan['how_single_last'];
									$code_dokan = new WP_Query(array(
									'post_type' => 'post',
									'posts_per_page' =>$how,
									'offset' => 0,
								));
								while ($code_dokan->have_posts()) : $code_dokan->the_post(); ?>
								
                                <li><a href="<?php the_permalink()?>"><?php the_title() ?> </a></li>
								<?php endwhile; ?>

                            </ul>
                        </div>
                        
                    </div>
                    
                   
                    
                    
                </div>
                
                
            </div>
        </div>
    </section>
          
    

<?php
get_footer();
?>    