| Server IP : 103.255.250.91 / Your IP : 216.73.217.146 Web Server : Apache System : Linux charlie.thegoodhost.io 5.14.0-570.39.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 4 05:08:52 EDT 2025 x86_64 User : tongkhen ( 1019) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/tongkhen/domains/carpetworld.com.sg/wp-content/themes/renovation/ |
Upload File : |
<?php
/* Template name: Home */
get_header();?>
<!------------contant-wrappwer------------->
<center><section class="contant-wrappwer">
<div class="container">
<div class="content-title">
<?php the_field('fst_description');?>
</div>
</div>
</section></center>
<!---------------transformations-wrapper----------------->
<?php
$paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
$args = array(
'post_type' => 'transformations',
'post_status' => 'publish',
'orderby' => 'ID',
'order' => 'DESC',
'posts_per_page' => 60,
'tax_query' => array(
array (
'taxonomy' => 'transformations_categories',
'field' => 'slug',
'terms' => 'home',
)
),
'paged' => $paged
);
$property_query = new WP_Query($args);
$count = $property_query->found_posts;
?>
<section class="transformations-wrapper">
<div class="container">
<div class="title-wrap">
<!-- <img src="<?php echo get_stylesheet_directory_uri();?>/images/title-img.png"> -->
<h1> <?php the_field('home_transformations_title');?></h1>
</div>
<ol class="row">
<?php
$xx = 1;
$xyz = 1;
if ($property_query->have_posts()) : while ($property_query->have_posts()) : $property_query->the_post();
$gallery_image = array();
$featured_imgs = array();
$featured_img = get_the_post_thumbnail_url(get_the_ID(),'full');
$no_img = get_bloginfo('template_directory').'/images/no-image.jpg';
if(!empty($featured_img)){
$featured_imgs = $featured_img;
} else {
$featured_imgs = $no_img;
}
?>
<li class="propertys col-md-4 col-12 xx" <?php echo get_field('special_offer'); ?>>
<div class="transformations-item">
<div class="images-sec">
<div class="img_crp">
<a href="<?php echo $featured_imgs;?>" data-fancybox="images_<?php echo get_the_ID();?>">
<img src="<?php echo $featured_imgs;?>">
</a>
<?php if( have_rows('image_gallery') ): ?>
<?php while( have_rows('image_gallery') ) : the_row(); ?>
<a style="display:none;" href="<?php echo get_sub_field('trf_galleryimage');?>" data-fancybox="images_<?php echo get_the_ID();?>">
<img src="<?php echo get_sub_field('trf_galleryimage');?>">
</a>
<?php endwhile; ?>
<?php endif;?>
</div>
<?php if (get_field('special_offer') == 'yes') { ?>
<div class="special-offer">
<a href="<?php echo $featured_imgs;?>" data-fancybox="images_<?php echo get_the_ID();?>">
<img src="<?php echo get_stylesheet_directory_uri();?>/images/Special-Offer.png">
</a>
</div>
<?php } elseif (get_field('special_offer') == 'no' && get_field('cr_sold_out') == 'yes') { ?>
<div class="sold-out">
<a href="<?php echo $featured_imgs;?>" data-fancybox="images_<?php echo get_the_ID();?>">
<img src="https://carpetworld.com.sg/wp-content/uploads/2025/02/soldout-1.png">
</a>
</div>
<?php } elseif (get_field('special_offer') == 'no' && get_field('cr_sold_out') == 'no' && get_field('limited_stock') == 'yes') { ?>
<div class="limited-stock">
<a href="<?php echo $featured_imgs;?>" data-fancybox="images_<?php echo get_the_ID();?>">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/limited-stock.png">
</a>
</div>
<?php } elseif (get_field('special_offer') == 'no' && get_field('cr_sold_out') == 'no' && get_field('limited_stock') == 'no' && get_field('low_price') == 'yes') { ?>
<div class="low-price">
<a href="<?php echo $featured_imgs;?>" data-fancybox="images_<?php echo get_the_ID();?>">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/low-price.png">
</a>
</div>
<?php } ?>
<?php $crp_custom_text = get_field('crp_custom_text'); ?>
<div class="budget-item">
<?php
if($crp_custom_text !=''){
?>
<h2><?php echo $crp_custom_text; ?></h2>
<?php
}
?>
<span><?php the_field('currency_sign','option') .''. the_field('budget');?></span>
</div>
</div>
<div class="transformations-bottom">
<div class="floor-area-text">
<h2><?php the_title();?></h2>
</div>
<div class="description-content">
<ul>
<?php if( have_rows('price_a_box') ): while( have_rows('price_a_box') ) : the_row();?>
<li><?php the_sub_field('price_a_title');?></li>
<?php endwhile; else : endif; ?>
</ul>
</div>
</div>
</div>
</li>
<div class="focus foucus<?php echo $xx; ?>">
<div class="container"></div>
<div class="controls">
<i id="<?php echo $xx; ?>" class="fa fa-times close" aria-hidden="true"></i>
<i id="<?php echo $xx; ?>" class="prev fa fa-arrow-left"></i>
<i id="<?php echo $xx; ?>" class="next fa fa-arrow-right"></i>
</div>
</div>
<?php $xx++; endwhile; wp_reset_postdata(); endif; ?>
<?php if($count > 9 ){ ?>
<div class="col-md-12 col-12" style="display: none">
<div class="view-more">
<a id="loadMore" href="<?php echo get_bloginfo('url');?>/carpet-floor-price">view more</a>
</div>
</div>
<?php } ?>
</ol>
</div>
</section>
<!-------------call-now-wrapper------------------>
<section class="call-now-wrapper bg-style" style="background-image: url('<?php the_field('Sct_background_image');?>'); border-top: 15px solid #a37e2c; border-bottom: 15px solid #a37e2c;">
<div class="container">
<div class="call-now-outer">
<h1><?php the_field('sct_description');?></h1>
</div>
</div>
</section>
<!---------------home-transformations-------------------->
<section class="home-transformations">
<div class="container">
<div class="title-wrap">
<!-- <img src="<?php echo get_stylesheet_directory_uri();?>/images/title-img.png"> -->
<h1 class="carpet-project"><?php the_field('tht_transformations_title');?></h1>
</div>
<?php $image_gallery = get_field('image_gallery'); ?>
<?php if( $image_gallery ): ?>
<ul class="image-gallery-row">
<?php foreach( $image_gallery as $gallery_image ): ?>
<li class="image-gallery">
<a href="<?php echo $gallery_image['url']; ?>" data-fancybox="images_<?php echo $gallery_image['ID']; ?>">
<img src="<?php echo $gallery_image['sizes']['medium']; ?>">
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
</section>
<!---------------roms-wrapper------------------>
<section class="roms-wrapper" style="border-top: 15px solid #a37e2c;">
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-12">
<div class="roms-contant-left desc-title">
<?php the_field('fifth_left_section_description');?>
</div>
</div>
<div class="col-md-6 col-12">
<div class="roms-images-right">
<img src="<?php the_field('fifth_right_section_image');?>">
</div>
</div>
</div>
</div>
</section>
<!---------------banner-wrap------------------->
<?php get_footer();?>