<?php
/**
 * Template for displaying courses
 *
 * @since v.1.0.0
 *
 * @author Themeum
 * @url https://themeum.com
 *
 * @package TutorLMS/Templates
 * @version 1.5.8
 */

get_header(); ?>
    <div id="primary" class="content-area">
		<main id="main" class="site-main pb-5 mb-4">
            <?php  //do_action('tutorque-enable-or-disable-header-section'); ?>
            <?php  do_action('edumodo-tutor-header-title-breadcrumb'); ?>

                <div class="<?php tutor_container_classes( ) ?>">
                    <?php
                    do_action('tutor_course/archive/before_loop');

                    if ( have_posts() ) :
                        /* Start the Loop */

                        tutor_course_loop_start();

                        while ( have_posts() ) : the_post();
                            /**
                             * @hook tutor_course/archive/before_loop_course
                             * @type action
                             * Usage Idea, you may keep a loop within a wrap, such as bootstrap col
                             */
                            do_action('tutor_course/archive/before_loop_course');

                            tutor_load_template('loop.course');

                            /**
                             * @hook tutor_course/archive/after_loop_course
                             * @type action
                             * Usage Idea, If you start any div before course loop, you can end it here, such as </div>
                             */
                            do_action('tutor_course/archive/after_loop_course');
                        endwhile;

                        tutor_course_loop_end();

                    else :

                        /**
                         * No course found
                         */
                        tutor_load_template('course-none');

                    endif;

                    ?>

                    <div class="tutorque-pagination">
                        <?php
                            the_posts_pagination( array(
                            'mid_size' => 1,
                            'prev_text'          =>  '<i class="fas fa-chevron-left"></i>',
                            'next_text'          =>  '<i class="fas fa-chevron-right"></i>',

                            ) );
                        ?>
                    </div>

                    <?php do_action('tutor_course/archive/after_loop');
                    ?>
                </div><!-- .wrap -->
         </main><!-- #main -->
	</div><!-- #primary -->             
<?php get_footer();
