<?php
/**
 * The template for displaying archive pages
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Edumodo
 */
	$post_id = edumodo_get_id();

get_header(); ?>


	<div id="primary" class="content-area">
		<main id="main" class="site-main">
        <div class="content-wrap">
          <div class="container">
              <div class="edumodo-teacher-2">
                <div class="row">

                      <?php 
                          if ( have_posts() ) : 
                          // $temp = $wp_query; 
                          // $wp_query = null; 
                          // $wp_query = new WP_Query(); 
                          // $wp_query->query('showposts=8&post_type=teacher'.'&paged='.$paged); 

                              while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

                                    <?php  get_template_part( 'template-parts/content', 'teacher');  ?>
                                    
                              <?php endwhile; wp_reset_postdata(); ?>

                        <?php 
                          // $wp_query = null; 
                          // $wp_query = $temp; 
                        ?>

                      <?php else:  ?>
                              <?php get_template_part( 'template-parts/content', 'none' ); 
                      endif; ?>

                </div><!-- .row -->
                <div class="row">
                  <div class="col-xs-12">
                    <div class="edumodo-pagination">
                          <?php
                            the_posts_pagination( array(
                              'mid_size' => 1,
                              'prev_text'          =>  '<i class="glyph-icon flaticon-left-arrow"></i>',
                              'next_text'          =>  '<i class="glyph-icon flaticon-right-arrow"></i>',

                            ) );
                          ?>
                    </div>
                  </div>
                </div><!-- .row -->
              </div><!-- /.div -->
          </div><!-- .container -->
        </div>
		</main><!-- #main -->
	</div><!-- #primary -->

<?php
get_footer();
