70 lines
2.5 KiB
PHP
70 lines
2.5 KiB
PHP
<?php
|
|
/**
|
|
* The template for displaying course single page
|
|
*/
|
|
|
|
get_header();
|
|
|
|
$ld_course_header_style = Upstudy::setting( 'ld_course_header_style' );
|
|
$ld_related_course_position = Upstudy::setting( 'ld_related_course_position' );
|
|
$ld_course_single_conflict_issue = Upstudy::setting( 'ld_course_single_conflict_issue' );
|
|
// ==== Course Header =====
|
|
|
|
while ( have_posts() ) : the_post();
|
|
|
|
upstudy_ld_course_page_title_section_03();
|
|
|
|
endwhile; wp_reset_postdata();
|
|
|
|
// ==== Content Area =====
|
|
echo '<div id="primary" class="content-area">';
|
|
echo '<main id="main" class="site-main" role="main">';
|
|
echo '<div class="upstudy-container">';
|
|
echo '<div class="upstudy-row">';
|
|
echo '<div class="upstudy-col-lg-8 order-2 order-lg-1 mt-4 mt-lg-0">';
|
|
|
|
while ( have_posts() ) : the_post();
|
|
|
|
get_template_part( 'learndash/tpl-part/single/single', 'content' );
|
|
|
|
endwhile;
|
|
|
|
// ==== Bug fix for review plugin has active ====
|
|
if (class_exists('LearnDash_Course_Reviews') && $ld_course_single_conflict_issue ) {
|
|
|
|
echo '</div>'; //Extra div for Course Reviews plugin conflict
|
|
|
|
echo '<div class="upstudy-col-lg-4 order-1 order-lg-2">';
|
|
|
|
get_template_part( 'learndash/tpl-part/single/single', 'sidebar');
|
|
|
|
echo '</div>'; // End col-4
|
|
echo '</div>'; // End col-8
|
|
}
|
|
else {
|
|
echo '</div>'; //Extra div
|
|
echo '<div class="upstudy-col-lg-4 order-1 order-lg-2">';
|
|
|
|
get_template_part( 'learndash/tpl-part/single/single', 'sidebar');
|
|
|
|
echo '</div>'; // End col-4
|
|
}
|
|
|
|
echo '</div>'; // End upstudy-row
|
|
|
|
echo '</div>';
|
|
|
|
if ( $ld_related_course_position == 'content' ) {
|
|
echo '<div class="upstudy-container">';
|
|
echo '<div class="upstudy-row">';
|
|
echo '<div class="related-post-wrap related_course">';
|
|
upstudy_ld_related_course_content();
|
|
echo '</div>';
|
|
echo '</div>'; // End upstudy-row
|
|
echo '</div>'; // End upstudy-container
|
|
}
|
|
|
|
echo '</main>';
|
|
echo '</div>';
|
|
|
|
get_footer(); |