<?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;
						?>
        
                            
                	<!--================================
							Video-Page-start
                    =================================-->        
        <div class="video-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();?>
						<?php $youtube_id = get_post_meta(get_the_ID(),'youtube_link', true); ?>
						
					<div class="codedokan-3 codedokan-m2">
                         <div class="video-page-wrpp">
                             <figure class="video-page-thumbnails">
                                 <?php if(has_post_thumbnail()){ 
												the_post_thumbnail();}
												else{?>
                                    <img src="https://img.youtube.com/vi/<?php echo $youtube_id;?>/maxresdefault.jpg" />
												<?php } ?>
                                 <a class="video-page-icon popup" href="https://www.youtube.com/watch?v=<?php echo $youtube_id;?>"> <i class="las la-play"></i> </a>
                                 <h5 class="video-caption">
                                     <a href="https://www.youtube.com/watch?v=<?php echo $youtube_id;?>"> <?php echo the_title();?> </a>
                                 </h5>
                             </figure>
                         </div>
                     </div>
					 
					 <?php endwhile; endif; ?> 
                     
				
 
                  
                    </div>

                   <div class="col-lg-12 col-md-12"><?php wp_bootstrap_pagination(); ?></div>
						</div>
              
            </div>
            
      
        
    
    
<?php
get_footer();
?>    