File: /home/platne/serwer143450/public_html/exzo.hillconnect.pl/wp-content/themes/exzo/single.php
<?php get_header(); ?>
<div class="header-empty-space"></div>
<div class="container">
<div class="empty-space col-xs-b15 col-sm-b30"></div>
<div class="breadcrumbs">
<?php $c = get_the_category();
?>
<a href="<?php echo esc_url( get_home_url( '/' ) ); ?>"> <?php esc_html_e( 'Home', 'exzo' ) ?>
</a>
<?php if ( isset( $c[0]->name{1} ) ) { ?>
<a href="<?php
echo esc_url( get_category_link( $c[0]->term_id ) ); ?>"><?php echo esc_html( $c[0]->name ); ?></a>
<?php } ?>
<a class="active" href="<?php echo esc_url( '#' ); ?>"><?php the_title(); ?></a>
</div>
<div class="empty-space col-xs-b15 col-sm-b50 col-md-b100"></div>
</div>
<!-- Content -->
<div class="content-inner">
<div class="container">
<div class="row">
<?php
$positin_sidebar = "";
if ( get_theme_mod( 'exzo_sidebar_position', 's2' ) == 's1' ) {
$positin_sidebar = 'left';
} else {
$positin_sidebar = 'right';
}
if ( isset( $_GET['showas'] ) && $_GET['showas'] == 'left' ) {
$positin_sidebar = 'left';
} elseif ( isset( $_GET['showas'] ) && $_GET['showas'] == 'right' ) {
$positin_sidebar = 'right';
}
if ( $positin_sidebar == 'left' ) {
get_sidebar();
}
?>
<div class="primary col-lg-9">
<?php if ( have_posts() ) : ?>
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
?>
<?php get_template_part( 'partials/content', get_post_format() ); ?>
<?php endwhile;
else :
endif; ?>
<div class="empty-space col-xs-b35 col-md-b70"></div>
<div class="empty-space col-xs-b35 col-md-b70"></div>
<div class="row">
<?php
$exzo_settings = get_exzo_settings();
if (isset($exzo_settings['exzo_related_posts_switch'])&& ( $exzo_settings['exzo_related_posts_switch'] ) == true) {
if (isset($exzo_settings['exzo_related_posts_num'][0])){
$post_count2 = $exzo_settings['exzo_related_posts_num'];
} else{
$post_count2 = 2;
}
if (isset($exzo_settings['exzo_related_posts_sort'][0])){
$post_sort = $exzo_settings['exzo_related_posts_sort'];
} else{
$post_sort = 'ASC';
}
$post_id = get_the_ID();
$categories = get_the_category( $post_id );
if ($categories ) {
$category_ids = array();
foreach ( $categories as $individual_category ) {
$category_ids[] = $individual_category->term_id;
}
$args = array(
'category__in' => $category_ids,
'post__not_in' => array( $post_id ),
'showposts' => $post_count2,
'order' => $post_sort,
'meta_query' => array( array( 'key' => '_thumbnail_id' ) )
);
$my_query = new wp_query( $args );
if ( $my_query->have_posts() ) {
while ( $my_query->have_posts() ) {
$my_query->the_post();
?>
<div class="col-sm-6 col-xs-b30 col-sm-b0">
<div class="icon-description-shortcode style-2">
<a href="#" class="image-icon simple-mouseover rounded-image">
<?php the_post_thumbnail( 'exzo-image-370x229-croped', array( 'class' => 'image-thumbnail rounded-image' ) ); ?>
</a>
<div class="content">
<h6 class="title h6"><a
href="<?php echo esc_url( get_the_permalink() ); ?>"><?php the_title(); ?></a>
</h6>
<div class="subtitle simple-article size-1 grey uppercase col-xs-b10">
<?php echo esc_html( get_the_date() ); ?>
<a class="color" href="<?php esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) ?>">
<?php echo esc_html( get_the_author() ); ?>
</a>
<?php exzo_get_list_cats(); ?></div>
<div class="description simple-article size-2"><?php echo exzo_limit_excerpt( 30 ); ?></div>
<a class="button size-1 style-3"
href="<?php echo esc_url( get_the_permalink() ); ?>">
<span class="button-wrapper">
<span class="icon"> <img
src=" <?php echo esc_url( get_template_directory_uri() ); ?>/img/icon-4.png"
alt=""></span>
<span class="text"><?php echo esc_html( get_theme_mod( 'exzo_blog_list_text', esc_html__( 'learn more ', 'exzo' ) ) ); ?></span>
</span>
</a>
<div class="empty-space col-xs-b35 col-md-b70"></div>
</div>
</div>
</div>
<?php
}
}
wp_reset_postdata();
}
}
?>
</div>
<div class="empty-space col-xs-b35 col-md-b70"></div>
<div class="empty-space col-xs-b35 col-md-b70"></div>
<?php
if ( comments_open() || get_comments_number() ) :
comments_template();
endif; ?>
</div>
<?php
if ( $positin_sidebar == 'right' ) {
get_sidebar();
}
?>
</div>
</div>
<?php get_footer(); ?>