<?php
 /* Template Name: Notice */ 
/**
 * 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;
?>  



						
					
					
                            
                	 
                <!--================================
                        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 the_title();?> 
                                <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['notice_date'];?> </th>
                                  <th scope="col"> <?php echo $codedokan['notice_title'];?> </th>
                                  <th scope="col"> <?php echo $codedokan['notice_view'];?> </th>
                                  
                                 </tr>
                                </thead>
                                <tbody>

                                    <?php
		$the_query = new WP_Query( array('post_type'=>'notice',
                                 'paged' => get_query_var('paged') ? get_query_var('paged') : 1) 
                            ); 
                            ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>

                                 <tr>
                                   <th class="wrpper" scope="row"><?php echo get_the_time("j F 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['notice_view']; ?> <span> <i class="las la-eye"></i></span> 
										<?php } ?>
                                    </td>

                                 </tr>
                                 <?php endwhile;?>  
								 
                
                                </tbody>
                            </table>
                    </div>

                    
                
						</div>
						
						
						 <div class="container">
								<div class="row">
									<div class="col-md-12">
			<?php 
			$big = 999999999; // need an unlikely integer
			 echo paginate_links( array(
				'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
				'format' => '?paged=%#%',
				'current' => max( 1, get_query_var('paged') ),
				'total' => $the_query->max_num_pages,
				'prev_text'    => __('« Prev'),
				'next_text'    => __('Next »'),
			) );

			wp_reset_postdata(); ?>

							</div>
						</div>
						</div>



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