<?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;
						?>
						
						
					
					
                            
                	 
                <!--================================
                        Archive-Page-Start
                ===============================-->

            <div class="archive-page">
			
				<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="container">
                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                     <tr>
                                   <th scope="col"> <?php echo $codedokan['info_date']; ?> </th>
                                  <th scope="col"> <?php echo $codedokan['info_title']; ?>  </th>
                                  <th scope="col"> <?php echo $codedokan['info_view']; ?> </th>
                                   <th scope="col"> <?php echo $codedokan['info_download']; ?> </th>
                                  
                                 </tr>
                                </thead>
                                <tbody>

                                    <?php if(have_posts()) : while(have_posts()) : the_post();?>
								 <tr>
                                   <th class="wrpper" scope="row"><?php echo get_the_time("j-m-Y"); ?></th>
         
                                    <td class="wrpper">  <?php the_title() ?> </td>
                                     <td class="wrpper archive-btn view-btn">
									 <?php if( '' !== get_post()->post_content ) { ?>
                                        <a href="<?php the_permalink()?>"> <?php echo $codedokan['info_view']; ?> <span> <i class="las la-eye"></i></span> 
										<?php } ?>
                                    </td>
                                   
                                     <td class="wrpper archive-btn">
									 <?php $information_image = get_post_meta(get_the_ID(),'information_image', true); if($information_image){ ?>
                                        <a href="<?php echo $information_image; ?>" target="_blank"> <?php echo $codedokan['info_download']; ?> <span> <i class="las la-download"></i></span> 
										<?php } ?>
                                    </td>
                                 </tr>
								 <?php endwhile; endif; ?> 
								 
                
                                </tbody>
                            </table>
                    </div>

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



                </div>
            </div>
                <!--================================
                        Archive-Page-End
                ===============================-->
        
                    
 
<?php
get_footer();
?>    