File: /var/www/k8148-2/htdocs/www.sport-roth.at/old/wp-content/themes/daniel/single.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Daniel
*/
get_header();
if( function_exists('danielSetPostViews') ){ danielSetPostViews( get_the_ID() ); }
//Layout
$blogdetailslayout = daniel_get_option( 'daniel_blogdetails_layout', 'blogdetailslayout', 'right' );
switch ( htmlspecialchars( $blogdetailslayout ) ) {
case 'left':
if( !is_active_sidebar( 'sidebar-1' ) ){
$blog_wrapper_class = 'ht-col-md-12 ht-col-xs-12';
}else{ $blog_wrapper_class = 'ht-col-md-9 ht-col-xs-12'; }
break;
case 'right':
if( !is_active_sidebar( 'sidebar-1' ) ){
$blog_wrapper_class = 'ht-col-md-12 ht-col-xs-12';
}else{ $blog_wrapper_class = 'ht-col-md-9 ht-col-xs-12'; }
break;
default:
$blog_wrapper_class = 'ht-col-md-12 ht-col-xs-12';
break;
}
?>
<div id="primary" class="content-area danielpage-padding">
<main id="main" class="site-main">
<div class="ht-container">
<div class="ht-row">
<?php if( $blogdetailslayout == 'left' && is_active_sidebar( 'sidebar-1' ) ): ?>
<div class="ht-col-md-3 ht-col-xs-12">
<?php get_sidebar();?>
</div>
<?php endif; ?>
<div class="<?php echo esc_attr( $blog_wrapper_class ); ?>">
<div class="ht-row">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'single' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</div>
</div>
<?php if( $blogdetailslayout == 'right' && is_active_sidebar( 'sidebar-1' ) ): ?>
<div class="ht-col-md-3 ht-col-xs-12">
<?php get_sidebar();?>
</div>
<?php endif; ?>
</div>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();