47 lines
1.4 KiB
PHP
47 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* The template for displaying archive pages
|
|
*
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
|
*
|
|
* @package Upstudy
|
|
*/
|
|
|
|
if ( is_tax( 'tp_event_tag' ) ) :
|
|
get_template_part( 'wp-events-manager/archive', 'event' );
|
|
return;
|
|
endif;
|
|
|
|
$author_redirect_to_courses = apply_filters( 'upstudy_ld_author_redirect_to_course', false );
|
|
if ( isset( $_GET['ldauthor'] ) ) :
|
|
$ldauthor = $_GET['ldauthor'];
|
|
else :
|
|
$ldauthor = false;
|
|
endif;
|
|
|
|
get_header();
|
|
|
|
$blog_layout = apply_filters( 'upstudy_archive_sidebar_layout', Upstudy::setting( 'blog_sidebar' ) );
|
|
echo '<div class="tpc-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-9' ) ) . '">';
|
|
echo '<main id="main" class="site-main">';
|
|
if ( 'sfwd-courses' === get_post_type() ) :
|
|
get_template_part( 'learndash/tpl-part/content', 'sfwd-courses' );
|
|
else :
|
|
get_template_part( 'template-parts/content', 'blog' );
|
|
endif;
|
|
echo '</main>';
|
|
echo '</div>';
|
|
|
|
if ( 'no-sidebar' !== $blog_layout ) :
|
|
if ( ( true != $author_redirect_to_courses ) || ( true == $author_redirect_to_courses && 'true' != $ldauthor ) ) :
|
|
get_sidebar();
|
|
endif;
|
|
endif;
|
|
|
|
do_action( 'upstudy_after_content' );
|
|
echo '</div>';
|
|
|
|
get_footer(); |