File: /var/www/vcstore.stgviitor.com/wp-content/themes/vcmarketplace/shop-page.php
<?php
/*
Template Name: Shop Page
*/
get_header();
?>
<section class="home-banner position-relative">
<div class="position-absolute top-0 start-0 w-100 h-100 banner-img">
<img src="<?php echo site_url(); ?>/wp-content/uploads/2024/06/home-banner.webp" alt="games" width="100%" height="100%">
</div>
<div class="container h-100">
<div class="row align-items-center h-100 banner-content">
<div class="col-12 col-md-6">
<nav class="mb-2" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item font-18">
<a href="https://viitorcloud.com/">Home</a>
</li>
<li class="breadcrumb-item font-18 active" aria-current="page">
<a href="<?php echo site_url();?>">Marketplace</a>
</li>
<li class="breadcrumb-item font-18 active" aria-current="page"><?php the_title(); ?></li>
</ol>
</nav>
<p class="font-64 text-white mb-4"> <?php echo esc_html($category->name); ?></p>
<p class="font-20 text-white">
Discover our all premium plugin
</p>
</div>
</div>
</div>
</section>
<section id="plugins" class="section-content py-80 pt-40">
<div class="container">
<div class="d-flex align-items-center justify-content-between">
<h3 class="font-30 m-0 text-black fw-light">
<?php echo esc_html($category->name); ?>
</h3>
</div>
<div class="row">
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => $category->slug,
),
),
);
$loop = new WP_Query($args);
if ($loop->have_posts()) :
while ($loop->have_posts()) : $loop->the_post(); global $product;
$title = get_the_title();
$excerpt = get_the_excerpt();
$permalink = get_permalink();
$thumbnail_id = get_post_thumbnail_id($product->ID);
$thumbnail = get_the_post_thumbnail_url($product->ID, 'medium');
$thumbnail_alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
?>
<div class="col-12 col-md-6 col-lg-4 mt-40">
<div class="d-flex align-items-center">
<a href="<?php echo get_permalink(); ?>" class="d-flex align-items-center">
<?php if($thumbnail) { ?>
<img src="<?php echo $thumbnail; ?>" alt="<?php echo esc_attr($thumbnail_alt); ?>" width="80" height="60" />
<?php } ?>
<div class="plugin-detail ms-4">
<p class="font-20 text-black"><?php echo esc_html($title); ?></p>
<p class="font-18 font-black-light mt-2"><?php echo esc_html($excerpt); ?></p>
</div>
</a>
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<p><?php _e('No products found', 'woocommerce'); ?></p>
<?php endif; ?>
<?php wp_reset_postdata(); // Reset the query ?>
</div>
</div>
</section>
<?php
do_action('woocommerce_after_main_content');
get_footer();
?>