<?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;
?> 



<?php				
						$obj = get_queried_object();
						$categroy_name = $obj->name;
						?>

			

 <!--================================
							Blog-Page-start
                      ===============================-->        
        <div class="blog-page">
                <div class="container">
                    <div class="row">              
                        <div class="col-lg-12 col-md-12">
                            <div class="video-p-title">
                               <?php echo $categroy_name;?> 
                                <div class="icon-class">
                                    <img src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-image.png" alt="">
                                </div>
                            
                            </div>
                        </div>
                    </div>
                    <div class="row">
                    
					 <?php if(have_posts()) : while(have_posts()) : the_post();?>
					<div class="codedokan-3 codedokan-m2">
                        <div class="blog-wrpp">
						<?php $image = wp_get_attachment_url( get_post_thumbnail_id($post->ID)); if($image){?>
                            <figure class="blog-image">
                                <img class="lazyload" src="<?php echo $image; ?>" data-src="<?php echo $image; ?>">	
                            </figure>
							<?php } ?>

                            <div class="blog-item">
                                <div class="blog-date">
                                    <ul>
                                        <?php $author_name = get_post_meta(get_the_ID(),'author_name', true);
																if($author_name){ ?>
                                            <li> <i class="las la-user"></i> <a href=""><?php echo $author_name; ?></a></li>
																<?php } ?>
                                            <li> <i class="las la-calendar"></i> <?php echo get_the_time("j F Y"); ?> </li>
                                    </ul>
                                </div>

                                <h1 class="blog-title">
                                    <a href="<?php the_permalink()?>"><?php the_title() ?> </a>
                                </h1>

                                <div class="blog-details">
                                   <?php echo excerpt($codedokan['how_blog_word']); ?>
                                </div>

                                <div class="blog-btn">
                                     <a href="<?php the_permalink(); ?>"> <i class="las la-angle-right"></i> <?php echo $codedokan['read_more']; ?> </a>
                                </div>
                            </div>
                        </div>
                    </div>

                    
                   <?php endwhile; endif; ?> 

                    
                   

                    

                    </div>
                           
                    
                    <div class="row">
						 <div class="col-lg-12 col-md-12"><?php wp_bootstrap_pagination(); ?></div>
						</div>
                            
                    
                    
            </div>
        </div>
					<!--================================
							Archive-Page-End
                      ===============================-->
	        
				



<?php
get_footer();
?>    