59 lines
2.1 KiB
PHP
59 lines
2.1 KiB
PHP
<?php
|
|
/**
|
|
* The template for displaying LearnDashh category page template
|
|
*
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
|
*
|
|
* @package Upstudy
|
|
*/
|
|
get_header();
|
|
use \Upstudy\Filter;
|
|
|
|
if ( ! isset( $get_options ) ) :
|
|
$get_options = array();
|
|
endif;
|
|
|
|
if ( ! isset( $style ) ) :
|
|
$style = Upstudy::setting('ld_course_archive_style');
|
|
endif;
|
|
|
|
if ( isset( $_GET['course_preset'] ) ) :
|
|
$style = Filter::grid_layout_keys();
|
|
endif;
|
|
|
|
$default_data = array(
|
|
'style' => $style
|
|
);
|
|
|
|
$upstudy_course_container = array();
|
|
|
|
if ( ! isset( $column ) ) :
|
|
$column = apply_filters( 'upstudy_course_archive_grid_column', array( 'upstudy-col-lg-4 upstudy-col-md-6 upstudy-col-sm-12' ) );
|
|
endif;
|
|
|
|
$upstudy_course_container = array_merge( $upstudy_course_container, $column );
|
|
$args = wp_parse_args( $get_options, $default_data );
|
|
|
|
echo '<div class="site-content-inner' . esc_attr( apply_filters( 'upstudy_container_class', ' upstudy-container' ) ) . '">';
|
|
do_action( 'upstudy_before_content' );
|
|
echo '<div id="primary" class="upstudy-' . get_post_type() . '-archive-wrapper content-area ' . esc_attr( apply_filters( 'upstudy_content_area_class', 'upstudy-col-lg-8' ) ) . '">';
|
|
echo '<main id="main" class="site-main">';
|
|
if ( have_posts() ) :
|
|
echo '<div class="upstudy-lms-courses-grid upstudy-row upstudy-course-archive">';
|
|
while ( have_posts() ) : the_post();
|
|
?>
|
|
<div id="post-<?php the_ID(); ?>" <?php post_class( apply_filters( 'upstudy_course_loop_classes', $upstudy_course_container ) ); ?> data-sal>
|
|
<?php get_template_part( 'learndash/tpl-part/course/th-layouts', '', $args );
|
|
echo '</div>';
|
|
endwhile;
|
|
wp_reset_postdata();
|
|
echo '</div>';
|
|
else :
|
|
_e( 'Sorry, No Course Found.', 'upstudy' );
|
|
endif;
|
|
echo '</main>';
|
|
echo '</div>';
|
|
do_action( 'upstudy_after_content' );
|
|
echo '</div>';
|
|
|
|
get_footer();
|