<?php
defined( 'ABSPATH' ) || exit;
get_header();
?>
<main>
<section>
<?php $current_category = single_cat_title('', false); ?>
<?php woocommerce_breadcrumb(); ?>
<?php echo do_shortcode( '[wcapf_form]' ); ?>
</section>
<section>
<?php
if ( woocommerce_product_loop() ) {
if ( wc_get_loop_prop( 'total' ) ) {
?>
<div class="catalog flex-box-column">
<span class="title">Каталог</span>
<div class="cards">
<?php
while ( have_posts() ) {
the_post();
global $product;
?>
<a href="<?php echo $product->get_permalink(); ?>" class="coffi-card">
<div class="card-coffins-content">
<img src="<?php the_post_thumbnail_url('shop_thumbnail'); ?>">
</div>
<div class="card-coffins-text flex-box-row space-between">
<span><?php echo $product->get_name() ?></span>
<div class="properties-card-coffins flex-box-row">
<p>
<?php
$subheadingvalues = get_the_terms( $product->id, 'pa_material');
$material = $subheadingvalues[0];
echo $material->name;
?>
</p>
<p>
<?php
$subheadingvalues = get_the_terms( $product->id, 'pa_size');
$size = $subheadingvalues[0];
echo $size->name;
?>
</p>
</div>
</div>
</a>
<?php
}
?>
</div>
<?php
}
/**
* Hook: woocommerce_after_shop_loop.
*
* @hooked woocommerce_pagination - 10
*/
do_action( 'woocommerce_after_shop_loop' );
} else {
?>
<div class="catalog-no-found">
ТОВАРЫ НЕ НАЙДЕНЫ
</div>
<?php
}
?>
</div>
</div>
</section>
</main>
<?php
get_footer();
?>
<?php
function add_woocommerce_support() {
add_theme_support('woocommerce');
}
add_action('after_setup_theme', 'add_woocommerce_support');