Sindbad~EG File Manager

Current Path : /home/frekansk/.trash/wp-content/themes/turitor/learnpress/
Upload File :
Current File : //home/frekansk/.trash/wp-content/themes/turitor/learnpress/content-archive-course-standard.php

<?php

	/**
	 * Prevent loading this file directly
	 */
	defined( 'ABSPATH' ) || exit();

	$course_order_by = 'DESC';
	if ( defined( 'FW' ) ) { 
		$course_order_by = turitor_option('course_order_by');
	}

	

   $paged    = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
  
   $args = array( 
		'post_type' => LP_COURSE_CPT,
		'orderby' => 'modified',
		'order' => $course_order_by,
		'posts_per_page' => LP()->settings->get('learn_press_archive_course_limit') ,
		'paged' => $paged 
	);

	$args = apply_filters('turitor_archive_post_args',$args);

	$query = new WP_Query($args);
	
	$total = $query->found_posts;
	if ( $total == 0 ) {
		$message = '<p class="message message-error">' . esc_html__( 'No courses found!', 'turitor' ) . '</p>';
		$index   = esc_html__( 'There are no available courses!', 'turitor' );
	} elseif ( $total == 1 ) {
		$index = esc_html__( 'Showing only one result', 'turitor' );
	} else {
		$courses_per_page = absint( LP()->settings->get( 'archive_course_limit' ) );
		

		$from = 1 + ( $paged - 1 ) * $courses_per_page;
		$to   = ( $paged * $courses_per_page > $total ) ? $total : $paged * $courses_per_page;

		if ( $from == $to ) {
			$index = sprintf(
				esc_html__( 'Showing last course of %s results', 'turitor' ),
				$total
			);
		} else {
			$index = sprintf(
				esc_html__( 'Showing %s-%s of %s results', 'turitor' ),
				$from,
				$to,
				$total
			);
		}
	}
	?>
	<div class="archive-course-filter mb-60">
		<div class="row ts-gutter-20px"> 
			<div class="col-md-3 text-center text-md-left align-self-center">
				<p class="text-index-result mb-15">
					<?php echo esc_html($index); ?> 
				</p>
			</div>
			<div class="col-md-9 ts-gutter-20px text-center text-md-right"> 
				<?php get_template_part('learnpress/filter','category-dropdown'); ?>
				<?php get_template_part('learnpress/filter','order'); ?>
			</div> 
		</div>
	</div>
	<div class="course-archive-list styel1">
		    <div class="row">
				<?php 
					if($query->have_posts()):
						while ($query->have_posts()) : $query->the_post();
							get_template_part( 'learnpress/content-course', 'archive' ); 
						endwhile;
						wp_reset_postdata();
					endif;
		    	?> 
			</div>
			<?php
				$GLOBALS['wp_query']->max_num_pages = $query->max_num_pages; 
				get_template_part( 'template-parts/blog/paginations/pagination', 'style1' );
			?>
	</div>
	<?php

	

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists