<?php
 /* Template Name: Spacial Corner */ 
/**
 * 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="row">              
                        <div class="col-lg-12 col-md-12">
                        <?php if ( ! dynamic_sidebar( 'spacial_corner_one' ) ): ?> <?php endif; ?>
                        </div>
                    </div>
                    
					
                <div class="container">
            <div class="row">
                
				 <?php
		$the_query = new WP_Query( array('post_type'=>'spacial_corner',
                                 'paged' => get_query_var('paged') ? get_query_var('paged') : 1) 
                            ); 
                            ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
				
				<div class="codedokan-3 codedokan-m2">
                    <div class="photo-gallery-wrpp">
                        <div class="photo-image">
                            <?php $image = wp_get_attachment_url( get_post_thumbnail_id($post->ID)); if($image){?>
                            
                            <a href="<?php the_permalink()?>">
                            <img class="lazyload" src="<?php echo $image; ?>" data-src="<?php echo $image; ?>">	
                            </a> 
                            	<?php } ?>
                        </div>
                        <div class="photo-title">
                            <a href="<?php the_permalink()?>" style="color:white"><?php the_title() ?></a>
                        </div>
                    </div>
                </div>                             
                
				<?php endwhile;?>  
  
                
            </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>
						
						</br>
							<div class="row">              
                        <div class="col-lg-12 col-md-12">
                        <?php if ( ! dynamic_sidebar( 'spacial_corner_two' ) ): ?> <?php endif; ?>
                        </div>
                    </div>
                    



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