| Current File : /home/tekstore/public_html/wp-content/themes/kuteshop/templates/blog/blog-content/grid.php |
<?php
/**
* Name: Blog Grid
**/
?>
<?php
$page_layout = kuteshop_page_layout();
$columns = kuteshop_get_option( 'blog_list_column', 2 );
$container = kuteshop_theme_option_meta(
'_custom_metabox_theme_options',
'main_container',
'metabox_main_container'
);
$sidebar_width = 0;
$sidebar_space = 0;
$blog_space = 15;
$crop = 0.63333333;
if ( $page_layout['layout'] == 'left' || $page_layout['layout'] == 'right' ) {
$sidebar_width = kuteshop_get_option( 'sidebar_width', 330 );
$sidebar_space = kuteshop_get_option( 'sidebar_space', 30 );
}
$width = ( $container - $sidebar_width - $sidebar_space - ( ( $columns - 1 ) * ( $blog_space * 2 ) ) ) / $columns;
$height = $width * $crop;
?>
<div class="blog-content blog-grid response-content"
style="--blog-columns: <?php echo esc_attr( $columns ); ?>; --blog-space: <?php echo esc_attr( $blog_space ); ?>px;">
<?php while ( have_posts() ): the_post(); ?>
<article <?php post_class( 'post-item style-01' ); ?>>
<div class="post-inner">
<?php kuteshop_post_thumbnail( $width, $height, false, true, 'd M' ); ?>
<div class="post-info">
<?php kuteshop_get_term_list(); ?>
<?php kuteshop_post_title(); ?>
<div class="post-metas">
<?php
if ( get_post_type() != 'product' ) {
kuteshop_post_author();
kuteshop_post_comment();
kuteshop_post_share_button();
}
?>
</div>
<?php
kuteshop_post_excerpt( 21 );
?>
</div>
</div>
</article>
<?php endwhile; ?>
</div>
<?php kuteshop_post_pagination(); ?>