abchospitality/wp-content/themes/abchospitality/products.php
2024-04-18 15:32:23 +05:45

96 lines
3.1 KiB
PHP

<?php
get_header(); ?>
<?php
while ( have_posts() ) :
the_post();?>
<!-- BREADCRUMB AREA START -->
<div class="ltn__breadcrumb-area ltn__breadcrumb-area-2 ltn__breadcrumb-color-white bg-overlay-theme-black-90 bg-image"
data-bg="img/bg/breadcrumb.png">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="ltn__breadcrumb-inner ltn__breadcrumb-inner-2 justify-content-between">
<div class="section-title-area ltn__section-title-2">
<!-- <h6 class="section-subtitle ltn__secondary-color">// Welcome to our company</h6> -->
<h1 class="section-title white-color">Our Products</h1>
</div>
<div class="ltn__breadcrumb-list">
<ul>
<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Home</a></li>
<li>Our Products</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- BREADCRUMB AREA END -->
<!-- PRODUCT DETAILS AREA START -->
<div class="ltn__product-slider-area ltn__product-gutter pt-90 custom-slider section-bg-1">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="section-title-area ltn__section-title-2 section-title-style-3 text-center">
<div class="section-title-in">
<h1 class="section-title" style="color:#017BAA">Our Products</h1>
</div>
</div>
</div>
</div>
<div class="row ltn__product-slider-item-four-active slick-arrow-1">
<!-- ltn__product-item -->
<?php
$args = array(
'post_type' => 'product', // Replace 'your_custom_post_type' with your custom post type slug
'posts_per_page' => -1, // Retrieve all posts
);
$product_query = new WP_Query($args);
if ($product_query->have_posts()) :
while ($product_query->have_posts()) : $product_query->the_post();
?>
<div class="col-lg-12" style="background:white; z-index:-1; height: 330px">
<div class="ltn__product-item ltn__product-item-3 text-center">
<div class="product-img text-center">
<img src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title_attribute(); ?>">
</div>
<div class="product-info">
<h4><?php the_title(); ?></h4>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
else :
// If no slides found
echo 'No slides found';
endif;
?>
</div>
</div>
</div>
<!-- PRODUCT DETAILS AREA END -->
<!-- PRODUCT TAB AREA START (product-item-3) -->
<?php include('bib-parts/remember-us.php'); ?>
<!-- PRODUCT TAB AREA END -->
<?php
endwhile ;
get_footer();?>