HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/israel-rentals/wp-content/themes/israel-rentals/index.php
<?php /* Template Name: index Page */
 get_header(); ?>
<section class="banner">
    <div class="container">
        <div class="bnr-cont">
            <div class="bnr-title">
                FIND THE PERFECT PLACE TO STAY<br />
                WITH YOUR FAMILY.
            </div>
            <div class="bnr-desc">
                Post your property for free and connect with potential renters
                easily. We ensure a smooth rental<br />
                process with a personal touch, from listing to leasing.
            </div>
        </div>
    </div>
    <div class="bnr-btm">
        <div class="container">
          
          <form class="search-box-wrp" id="searchForm">
              <input type="text" class="form-control" id="searchInput" placeholder="Search" />
              <input type="hidden" id="searchListPro" value="0" />
              <input type="hidden" name="post_type" value="property" /> <!-- Specify the post type -->
              <button type="submit" class="btn-search">
                  <img src="<?php echo get_template_directory_uri(); ?>/img/search-icon.svg" alt="Search" />
              </button>
          </form>
           
        </div>
      </div>
    </section>
    <section class="listing">
      <div class="container">
        <!-- Tabs -->
        <ul class="nav nav-tabs" id="propertyTab" role="tablist">
          <li class="nav-item">
            <a
              class="nav-link active"
              id="all-tab"
              data-bs-toggle="tab"
              href="#all"
              role="tab"
              aria-controls="all"
              aria-selected="true"
              >All</a
            >
          </li>
          <li class="nav-item">
            <a
              class="nav-link"
              id="house-tab"
              data-bs-toggle="tab"
              href="#house"
              role="tab"
              aria-controls="house"
              aria-selected="true"
              >House</a
            >
          </li>
          <li class="nav-item">
            <a
              class="nav-link"
              id="#apartments-tab"
              data-bs-toggle="tab"
              href="#apartments"
              role="tab"
              aria-controls="apartments"
              aria-selected="true"
              >Apartments</a
            >
          </li>
          <li class="nav-item">
            <a
              class="nav-link"
              id="#office-tab"
              data-bs-toggle="tab"
              href="#office"
              role="tab"
              aria-controls="office"
              aria-selected="true"
              >Office</a
            >
          </li>
          <!-- Add more tabs if needed -->
        </ul>

        <div class="tab-content" id="propertyTabContent">
          <!-- Tab Pane for All -->
          <div
            class="tab-pane fade show active"
            id="all"
            role="tabpanel"
            aria-labelledby="all-tab"
          >
            <div class="row searchProperty">
            <?php
              // Custom query to fetch property posts
              $args = array(
                  'post_type' => 'property', // Custom post type 'property'
                  'posts_per_page' => -1, // Number of properties to display (-1 for all)
              );
              $property_query = new WP_Query($args);

              // Loop through each property post
              if ($property_query->have_posts()) :
                  while ($property_query->have_posts()) : $property_query->the_post();
                  $post_id = get_the_ID();
                      // Get post meta (property data)
                      $location = get_post_meta(get_the_ID(), '_property_location', true);
                      $type = get_post_meta(get_the_ID(), '_property_residence_type', true);
                      $bedrooms = get_post_meta(get_the_ID(), '_property_bedrooms', true);
                      $bathrooms = get_post_meta(get_the_ID(), '_property_bathrooms', true);
                      $term = get_post_meta(get_the_ID(), '_property_term', true);
                      $price = get_post_meta(get_the_ID(), '_property_price', true);
                      $utilities = get_post_meta(get_the_ID(), '_property_utilities', true);
                      $contact_info = get_post_meta(get_the_ID(), '_property_contact_info', true);
                      $additional_info = get_post_meta(get_the_ID(), '_property_additional_info', true);
                      $images = get_post_meta(get_the_ID(), '_property_images', true);
                      ?>
            <div class="col-md-4 box">
                <div class="property-box">
                  <div class="image-slider slick-slider">
                  <?php 
                    // Loop through images if they exist (example handling of multiple image uploads)
                    if (!empty($images)) {
                        foreach ($images as $image_id) {?>
                          <div class="images-buttn-text">
                          <a class="img" href="<?= get_permalink($post_id); ?>">
                            <img src="<?=esc_url($image_id)?>" alt="House 1" />
                        </a>
                          <div class="btn-text">
                            <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                            <span class="loc"><?php echo esc_html($location); ?></span>
                          </div>
                        </div>
                  <?php }
                  }
                  ?>
                  </div>
                  <div class="property-description">
                    <div class="top-sec">
                      <div class="lt-sec"><?php echo esc_html($type); ?></div>
                      <div class="rt-sec"><?php echo esc_html($term); ?></div>
                    </div>
                    <div class="subtext"><?php the_title(); // Display property title ?></div>
                    <div class="texts"><?php echo esc_html($additional_info); ?></div>
                    <div class="prperty-detils">
                      <div class="money">
                      <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                        <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                      </div>
                    </div>
                  </div>
                  <div class="overlay">
                  <a href="<?= get_permalink($post_id); ?>" class="overlay-link-wrp">
                  <div class="details">
                    <div class="property-description1">
                      <div class="btn-text">
                        <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                        <span class="loc"><?php echo esc_html($location); ?></span>
                      </div>
                      <div class="top-sec-btns tags">
                        <div class="tag1"><?php echo esc_html($type); ?></div>
                        <div class="tag1"><?php echo esc_html($term); ?></div>
                      </div>
                      <div class="subtext"><?php the_title(); // Display property title ?></div>
                      <div class="texts"><?php echo esc_html($additional_info); ?></div>
                      <div class="prperty-detils">
                        <div class="money">
                        <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                          <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                        </div>
                      </div>
                    </div>

                    <div class="room-details">
                      <!-- <div class="area">
                        <div class="head">Area</div>
                        <div class="sq-fts">2100 m2</div>
                      </div> -->
                      <div class="area">
                        <div class="head">Beds</div>
                        <div class="sq-fts"><?=esc_html($bedrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Baths</div>
                        <div class="sq-fts"><?=esc_html($bathrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Garages</div>
                        <div class="sq-fts">1</div>
                      </div>
                    </div>
                  </div>
                  <div class="last-sec">
                    <div class="rtt-secs">
                      <span class="img-sec"><img src="<?php echo get_template_directory_uri(); ?>/img/calendar.png" /></span>
                      <?php 
                      // Get the date when the post was published
                      $post_date = get_the_date('U'); 
                      $current_time = current_time('U');
                      $time_diff = human_time_diff($post_date, $current_time);
                      ?>
                      <span><?php echo 'Listed ' . $time_diff . ' ago' ?></span>
                    </div>
                    <div class="lt-secs">
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/swimming-pool.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/restaurant.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/last-ico.png" /></span>
                    </div>
                  </div>
                </a>
                  <div class="enquire-btn">
                  <a href="#" class="btn-enquire"  
                            data-title="<?php echo the_title(); ?>"
                            data-post-id="<?php echo $post_id; ?>"
                            data-location="<?php echo esc_attr($location); ?>"
                            data-type="<?php echo esc_attr($type); ?>"
                            data-additionalinfo="<?php echo esc_attr($additional_info); ?>">Enquire Now</a>
                  </div>
                </div>
                </div>
              </div>
              <?php
    endwhile;
else :
    echo '<p>No properties found</p>';
endif;

// Reset Post Data
wp_reset_postdata();
?>
          </div>
          <div class="view-more">
            <a href="<?=site_url('listing-page')?>" class="view"
              ><span> View more</span>
              <span><img src="<?php echo get_template_directory_uri(); ?>/img/arrow-right.png" alt="arrow-right" /></span
            ></a>
          </div>
        </div>

        <!-- Tab Pane for House -->
        <div
            class="tab-pane fade show"
            id="house"
            role="tabpanel"
            aria-labelledby="all-tab"
          >
            <div class="row">
            <?php
              // Custom query to fetch property posts
              $args = array(
                'post_type'      => 'property', // Custom post type 'property'
                'posts_per_page' => -1, // Number of properties to display (-1 for all)
                'meta_query'     => array(
                    array(
                        'key'     => '_property_residence_type', // Custom field key
                        'value'   => array('house', 'Town House'), // Values to filter
                        'compare' => 'IN', // Compare operator to match any of the values
                    ),
                ),
            );
              $property_query = new WP_Query($args);

              // Loop through each property post
              if ($property_query->have_posts()) :
                  while ($property_query->have_posts()) : $property_query->the_post();
                  $post_id = get_the_ID();
                      // Get post meta (property data)
                      $location = get_post_meta(get_the_ID(), '_property_location', true);
                      $type = get_post_meta(get_the_ID(), '_property_residence_type', true);
                      $bedrooms = get_post_meta(get_the_ID(), '_property_bedrooms', true);
                      $bathrooms = get_post_meta(get_the_ID(), '_property_bathrooms', true);
                      $term = get_post_meta(get_the_ID(), '_property_term', true);
                      $price = get_post_meta(get_the_ID(), '_property_price', true);
                      $utilities = get_post_meta(get_the_ID(), '_property_utilities', true);
                      $contact_info = get_post_meta(get_the_ID(), '_property_contact_info', true);
                      $additional_info = get_post_meta(get_the_ID(), '_property_additional_info', true);
                      $images = get_post_meta(get_the_ID(), '_property_images', true);
                      ?>
            <div class="col-md-4 box">
                <div class="property-box">
                  <div class="image-slider slick-slider">
                  <?php 
                    // Loop through images if they exist (example handling of multiple image uploads)
                    if (!empty($images)) {
                        foreach ($images as $image_id) {?>
                          <div class="images-buttn-text">
                          <a class="img" href="<?= get_permalink($post_id); ?>">
                            <img src="<?=esc_url($image_id)?>" alt="House 1" />
                        </a>
                          <div class="btn-text">
                            <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                            <span class="loc"><?php echo esc_html($location); ?></span>
                          </div>
                        </div>
                  <?php }
                  }
                  ?>
                  </div>
                  <div class="property-description">
                    <div class="top-sec">
                      <div class="lt-sec"><?php echo esc_html($type); ?></div>
                      <div class="rt-sec"><?php echo esc_html($term); ?></div>
                    </div>
                    <div class="subtext"><?php the_title(); // Display property title ?></div>
                    <div class="texts"><?php echo esc_html($additional_info); ?></div>
                    <div class="prperty-detils">
                      <div class="money">
                      <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                        <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                      </div>
                    </div>
                  </div>
                  <div class="overlay">
                  <a href="<?= get_permalink($post_id); ?>" class="overlay-link-wrp">
                  <div class="details">
                    <div class="property-description1">
                      <div class="btn-text">
                        <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                        <span class="loc"><?php echo esc_html($location); ?></span>
                      </div>
                      <div class="top-sec-btns tags">
                        <div class="tag1"><?php echo esc_html($type); ?></div>
                        <div class="tag1"><?php echo esc_html($term); ?></div>
                      </div>
                      <div class="subtext"><?php the_title(); // Display property title ?></div>
                      <div class="texts"><?php echo esc_html($additional_info); ?></div>
                      <div class="prperty-detils">
                        <div class="money">
                        <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                          <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                        </div>
                      </div>
                    </div>

                    <div class="room-details">
                      <!-- <div class="area">
                        <div class="head">Area</div>
                        <div class="sq-fts">2100 m2</div>
                      </div> -->
                      <div class="area">
                        <div class="head">Beds</div>
                        <div class="sq-fts"><?=esc_html($bedrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Baths</div>
                        <div class="sq-fts"><?=esc_html($bathrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Garages</div>
                        <div class="sq-fts">1</div>
                      </div>
                    </div>
                  </div>
                  <div class="last-sec">
                    <div class="rtt-secs">
                      <span class="img-sec"><img src="<?php echo get_template_directory_uri(); ?>/img/calendar.png" /></span>
                      <?php 
                      // Get the date when the post was published
                      $post_date = get_the_date('U'); 
                      $current_time = current_time('U');
                      $time_diff = human_time_diff($post_date, $current_time);
                      ?>
                      <span><?php echo 'Listed ' . $time_diff . ' ago' ?></span>
                    </div>
                    <div class="lt-secs">
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/swimming-pool.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/restaurant.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/last-ico.png" /></span>
                    </div>
                  </div>
                </a>
                  <div class="enquire-btn">
                  <a href="#" class="btn-enquire"  
                            data-title="<?php echo the_title(); ?>"
                            data-post-id="<?php echo $post_id; ?>"
                            data-location="<?php echo esc_attr($location); ?>"
                            data-type="<?php echo esc_attr($type); ?>"
                            data-additionalinfo="<?php echo esc_attr($additional_info); ?>">Enquire Now</a>
                  </div>
                </div>
                </div>
              </div>
              <?php
    endwhile;
else :
    echo '<p>No properties found</p>';
endif;

// Reset Post Data
wp_reset_postdata();
?>
          </div>
          <div class="view-more">
            <a href="<?=site_url('listing-page')?>" class="view"
              ><span> View more</span>
              <span><img src="<?php echo get_template_directory_uri(); ?>/img/arrow-right.png" alt="arrow-right" /></span
            ></a>
          </div>
        </div>

         <!-- Tab Pane for Apartments -->
         <div
            class="tab-pane fade show"
            id="apartments"
            role="tabpanel"
            aria-labelledby="all-tab"
          >
            <div class="row">
            <?php
              // Custom query to fetch property posts
              $args = array(
                'post_type'      => 'property', // Custom post type 'property'
                'posts_per_page' => -1, // Number of properties to display (-1 for all)
                'meta_query'     => array(
                    array(
                        'key'     => '_property_residence_type', // Custom field key
                        'value'   => array('Apartment', 'Basement Apartment'), // Values to filter
                        'compare' => 'IN', // Compare operator to match any of the values
                    ),
                ),
            );
              $property_query = new WP_Query($args);

              // Loop through each property post
              if ($property_query->have_posts()) :
                  while ($property_query->have_posts()) : $property_query->the_post();
                  $post_id = get_the_ID();
                      // Get post meta (property data)
                      $location = get_post_meta(get_the_ID(), '_property_location', true);
                      $type = get_post_meta(get_the_ID(), '_property_residence_type', true);
                      $bedrooms = get_post_meta(get_the_ID(), '_property_bedrooms', true);
                      $bathrooms = get_post_meta(get_the_ID(), '_property_bathrooms', true);
                      $term = get_post_meta(get_the_ID(), '_property_term', true);
                      $price = get_post_meta(get_the_ID(), '_property_price', true);
                      $utilities = get_post_meta(get_the_ID(), '_property_utilities', true);
                      $contact_info = get_post_meta(get_the_ID(), '_property_contact_info', true);
                      $additional_info = get_post_meta(get_the_ID(), '_property_additional_info', true);
                      $images = get_post_meta(get_the_ID(), '_property_images', true);
                      ?>
            <div class="col-md-4 box">
                <div class="property-box">
                  <div class="image-slider slick-slider">
                  <?php 
                    // Loop through images if they exist (example handling of multiple image uploads)
                    if (!empty($images)) {
                        foreach ($images as $image_id) {?>
                          <div class="images-buttn-text">
                          <a class="img" href="<?= get_permalink($post_id); ?>">
                            <img src="<?=esc_url($image_id)?>" alt="House 1" />
                        </a>
                          <div class="btn-text">
                            <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                            <span class="loc"><?php echo esc_html($location); ?></span>
                          </div>
                        </div>
                  <?php }
                  }
                  ?>
                  </div>
                  <div class="property-description">
                    <div class="top-sec">
                      <div class="lt-sec"><?php echo esc_html($type); ?></div>
                      <div class="rt-sec"><?php echo esc_html($term); ?></div>
                    </div>
                    <div class="subtext"><?php the_title(); // Display property title ?></div>
                    <div class="texts"><?php echo esc_html($additional_info); ?></div>
                    <div class="prperty-detils">
                      <div class="money">
                      <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                        <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                      </div>
                    </div>
                  </div>
                  <div class="overlay">
                  <a href="<?= get_permalink($post_id); ?>" class="overlay-link-wrp">
                  <div class="details">
                    <div class="property-description1">
                      <div class="btn-text">
                        <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                        <span class="loc"><?php echo esc_html($location); ?></span>
                      </div>
                      <div class="top-sec-btns tags">
                        <div class="tag1"><?php echo esc_html($type); ?></div>
                        <div class="tag1"><?php echo esc_html($term); ?></div>
                      </div>
                      <div class="subtext"><?php the_title(); // Display property title ?></div>
                      <div class="texts"><?php echo esc_html($additional_info); ?></div>
                      <div class="prperty-detils">
                        <div class="money">
                        <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                          <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                        </div>
                      </div>
                    </div>

                    <div class="room-details">
                      <!-- <div class="area">
                        <div class="head">Area</div>
                        <div class="sq-fts">2100 m2</div>
                      </div> -->
                      <div class="area">
                        <div class="head">Beds</div>
                        <div class="sq-fts"><?=esc_html($bedrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Baths</div>
                        <div class="sq-fts"><?=esc_html($bathrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Garages</div>
                        <div class="sq-fts">1</div>
                      </div>
                    </div>
                  </div>
                  <div class="last-sec">
                    <div class="rtt-secs">
                      <span class="img-sec"><img src="<?php echo get_template_directory_uri(); ?>/img/calendar.png" /></span>
                      <?php 
                      // Get the date when the post was published
                      $post_date = get_the_date('U'); 
                      $current_time = current_time('U');
                      $time_diff = human_time_diff($post_date, $current_time);
                      ?>
                      <span><?php echo 'Listed ' . $time_diff . ' ago' ?></span>
                    </div>
                    <div class="lt-secs">
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/swimming-pool.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/restaurant.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/last-ico.png" /></span>
                    </div>
                  </div>
                </a>
                  <div class="enquire-btn">
                  <a href="#" class="btn-enquire"  
                            data-title="<?php echo the_title(); ?>"
                            data-post-id="<?php echo $post_id; ?>"
                            data-location="<?php echo esc_attr($location); ?>"
                            data-type="<?php echo esc_attr($type); ?>"
                            data-additionalinfo="<?php echo esc_attr($additional_info); ?>">Enquire Now</a>
                  </div>
                </div>
                </div>
              </div>
              <?php
    endwhile;
else :
    echo '<p>No properties found</p>';
endif;

// Reset Post Data
wp_reset_postdata();
?>
          </div>
          <div class="view-more">
            <a href="<?=site_url('listing-page')?>" class="view"
              ><span> View more</span>
              <span><img src="<?php echo get_template_directory_uri(); ?>/img/arrow-right.png" alt="arrow-right" /></span
            ></a>
          </div>
        </div>

         <!-- Tab Pane for Office -->
         <div
            class="tab-pane fade show"
            id="Office"
            role="tabpanel"
            aria-labelledby="all-tab"
          >
            <div class="row">
            <?php
              // Custom query to fetch property posts
              $args = array(
                'post_type'      => 'property', // Custom post type 'property'
                'posts_per_page' => -1, // Number of properties to display (-1 for all)
                'meta_query'     => array(
                    array(
                        'key'     => '_property_residence_type', // Custom field key
                        'value' => 'office', // Value to filter
                        'compare' => '=', // Comparison operator
                    ),
                ),
            );
              $property_query = new WP_Query($args);

              // Loop through each property post
              if ($property_query->have_posts()) :
                  while ($property_query->have_posts()) : $property_query->the_post();
                  $post_id = get_the_ID();
                      // Get post meta (property data)
                      $location = get_post_meta(get_the_ID(), '_property_location', true);
                      $type = get_post_meta(get_the_ID(), '_property_residence_type', true);
                      $bedrooms = get_post_meta(get_the_ID(), '_property_bedrooms', true);
                      $bathrooms = get_post_meta(get_the_ID(), '_property_bathrooms', true);
                      $term = get_post_meta(get_the_ID(), '_property_term', true);
                      $price = get_post_meta(get_the_ID(), '_property_price', true);
                      $utilities = get_post_meta(get_the_ID(), '_property_utilities', true);
                      $contact_info = get_post_meta(get_the_ID(), '_property_contact_info', true);
                      $additional_info = get_post_meta(get_the_ID(), '_property_additional_info', true);
                      $images = get_post_meta(get_the_ID(), '_property_images', true);
                      ?>
            <div class="col-md-4 box">
                <div class="property-box">
                  <div class="image-slider slick-slider">
                  <?php 
                    // Loop through images if they exist (example handling of multiple image uploads)
                    if (!empty($images)) {
                        foreach ($images as $image_id) {?>
                          <div class="images-buttn-text">
                          <a class="img" href="<?= get_permalink($post_id); ?>">
                            <img src="<?=esc_url($image_id)?>" alt="House 1" />
                        </a>
                          <div class="btn-text">
                            <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                            <span class="loc"><?php echo esc_html($location); ?></span>
                          </div>
                        </div>
                  <?php }
                  }
                  ?>
                  </div>
                  <div class="property-description">
                    <div class="top-sec">
                      <div class="lt-sec"><?php echo esc_html($type); ?></div>
                      <div class="rt-sec"><?php echo esc_html($term); ?></div>
                    </div>
                    <div class="subtext"><?php the_title(); // Display property title ?></div>
                    <div class="texts"><?php echo esc_html($additional_info); ?></div>
                    <div class="prperty-detils">
                      <div class="money">
                      <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                        <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                      </div>
                    </div>
                  </div>
                  <div class="overlay">
                  <a href="<?= get_permalink($post_id); ?>" class="overlay-link-wrp">
                  <div class="details">
                    <div class="property-description1">
                      <div class="btn-text">
                        <span><img src="<?php echo get_template_directory_uri(); ?>/img/loaction.png" /></span>
                        <span class="loc"><?php echo esc_html($location); ?></span>
                      </div>
                      <div class="top-sec-btns tags">
                        <div class="tag1"><?php echo esc_html($type); ?></div>
                        <div class="tag1"><?php echo esc_html($term); ?></div>
                      </div>
                      <div class="subtext"><?php the_title(); // Display property title ?></div>
                      <div class="texts"><?php echo esc_html($additional_info); ?></div>
                      <div class="prperty-detils">
                        <div class="money">
                        <span><?php echo '$' . number_format(esc_html($price)) . '/mo'; ?></span>
                          <!-- <span class="squre-ft">- $6.000.00/sq ft</span> -->
                        </div>
                      </div>
                    </div>

                    <div class="room-details">
                      <!-- <div class="area">
                        <div class="head">Area</div>
                        <div class="sq-fts">2100 m2</div>
                      </div> -->
                      <div class="area">
                        <div class="head">Beds</div>
                        <div class="sq-fts"><?=esc_html($bedrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Baths</div>
                        <div class="sq-fts"><?=esc_html($bathrooms)?></div>
                      </div>
                      <div class="area">
                        <div class="head">Garages</div>
                        <div class="sq-fts">1</div>
                      </div>
                    </div>
                  </div>
                  <div class="last-sec">
                    <div class="rtt-secs">
                      <span class="img-sec"><img src="<?php echo get_template_directory_uri(); ?>/img/calendar.png" /></span>
                      <?php 
                      // Get the date when the post was published
                      $post_date = get_the_date('U'); 
                      $current_time = current_time('U');
                      $time_diff = human_time_diff($post_date, $current_time);
                      ?>
                      <span><?php echo 'Listed ' . $time_diff . ' ago' ?></span>
                    </div>
                    <div class="lt-secs">
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/swimming-pool.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/restaurant.png" /></span>
                      <span><img src="<?php echo get_template_directory_uri(); ?>/img/last-ico.png" /></span>
                    </div>
                  </div>
                </a>
                  <div class="enquire-btn">
                    <button class="btn-enquire">Enquire Now</button>
                  </div>
                </div>
                </div>
              </div>
              <?php
    endwhile;
else :
    echo '<p>No properties found</p>';
endif;

// Reset Post Data
wp_reset_postdata();
?>
          </div>
          <div class="view-more">
            <a href="<?=site_url('listing-page')?>" class="view"
              ><span> View more</span>
              <span><img src="<?php echo get_template_directory_uri(); ?>/img/arrow-right.png" alt="arrow-right" /></span
            ></a>
          </div>
        </div>


      </div>
    </section>
    <section class="banner-sec">
      <div class="banner-section">
        <div class="container">
          <div class="sub-heading">Submit Your Listing</div>
          <div class="main-heading">
            READY TO RENT OUT YOUR PROPERTY? LAKEWOOD <br />
            RENTALS MAKES IT EASY & HASSLE-FREE!
          </div>

          <div class="box-container">
            <div class="info-box">
              <div class="ico">
                <img src="<?php echo get_template_directory_uri(); ?>/img/ico1.png" alt="Wide Exposure" />
              </div>

              <div class="box-text">
                <div class="text-inner">Wide Exposure</div>
                <div class="text-sec">
                  Reach a large audience of potential renters
                </div>
              </div>
            </div>

            <div class="info-box">
              <div class="ico"><img src="<?php echo get_template_directory_uri(); ?>/img/ico2.png" alt="Support" /></div>

              <div class="box-text">
                <div class="text-inner">No Hidden Fees</div>
                <div class="text-sec">
                  Benefit from our transparent pricing<br> model with no hidden
                  charges
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="container blue-box-wrp">
          <div class="blue-box">
            <p>
              Simply provide your property details, and we’ll handle the rest.
              With free listings and personalized support, we’ll help you find
              the right tenants quickly. Whether it’s a cozy apartment or a
              spacious home, your next tenant could be just a few clicks away!
            </p>
            <button class="btn-submit">Submit Your Listing</button>
          </div>
        </div>
      </div>
    </section>
    <section class="client-testimonials">
      <div class="container">
        <div class="title-wrp">
          <div class="sec-title">OUR CLIENTS TESTIMONIALS</div>
          <div class="sub-txt">
            Lorem Ipsum is simply dummy text of the printing and typesetting
            industry.<br />
            Lorem Ipsum has been
          </div>
        </div>
      </div>
      <div class="slider-wrap">
        <div class="testimonial-slider">
          <div class="slide">
            <div class="cont-wrp">
              <div class="para">
                “Lorem Ipsum is simply dummy text of the printing and
                typesetting industry. Lorem Ipsum has been the industry's
                standard dummy text ever since the 1500s, when an unknown
                printer took a galley of type and scrambled it to make a type
                specimen book. It has survived not only five centuries, but also
                the leap into electronic .”
              </div>
              <div class="author-blk">
                <div class="pic">
                  <img src="<?php echo get_template_directory_uri(); ?>/img/slider-profile.png" alt="" />
                </div>
                <div class="author-dtls">
                  <div class="name">Rivka R.</div>
                  <div class="desig">COPE graduate Monsey, NY</div>
                </div>
              </div>
            </div>
          </div>
          <div class="slide">
            <div class="cont-wrp">
              <div class="para">
                “Lorem Ipsum is simply dummy text of the printing and
                typesetting industry. Lorem Ipsum has been the industry's
                standard dummy text ever since the 1500s, when an unknown
                printer took a galley of type and scrambled it to make a type
                specimen book. It has survived not only five centuries, but also
                the leap into electronic .”
              </div>
              <div class="author-blk">
                <div class="pic">
                  <img src="<?php echo get_template_directory_uri(); ?>/img/slider-profile.png" alt="" />
                </div>
                <div class="author-dtls">
                  <div class="name">Rivka R.</div>
                  <div class="desig">COPE graduate Monsey, NY</div>
                </div>
              </div>
            </div>
          </div>
          <div class="slide">
            <div class="cont-wrp">
              <div class="para">
                “Lorem Ipsum is simply dummy text of the printing and
                typesetting industry. Lorem Ipsum has been the industry's
                standard dummy text ever since the 1500s, when an unknown
                printer took a galley of type and scrambled it to make a type
                specimen book. It has survived not only five centuries, but also
                the leap into electronic .”
              </div>
              <div class="author-blk">
                <div class="pic">
                  <img src="<?php echo get_template_directory_uri(); ?>/img/slider-profile.png" alt="" />
                </div>
                <div class="author-dtls">
                  <div class="name">Rivka R.</div>
                  <div class="desig">COPE graduate Monsey, NY</div>
                </div>
              </div>
            </div>
          </div>
          <div class="slide">
            <div class="cont-wrp">
              <div class="para">
                “Lorem Ipsum is simply dummy text of the printing and
                typesetting industry. Lorem Ipsum has been the industry's
                standard dummy text ever since the 1500s, when an unknown
                printer took a galley of type and scrambled it to make a type
                specimen book. It has survived not only five centuries, but also
                the leap into electronic .”
              </div>
              <div class="author-blk">
                <div class="pic">
                  <img src="<?php echo get_template_directory_uri(); ?>/img/slider-profile.png" alt="" />
                </div>
                <div class="author-dtls">
                  <div class="name">Rivka R.</div>
                  <div class="desig">COPE graduate Monsey, NY</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
    <section class="faq-sec">
      <div class="container mt-4">
        <div class="faq-heading">FREQUENTLY ASKED QUESTIONS</div>

        <div class="accordion" id="faqAccordion">
          <div class="accordion-item">
            <div
              class="accordion-button collapsed"
              data-bs-toggle="collapse"
              data-bs-target="#collapseOne"
              aria-expanded="false"
              aria-controls="collapseOne"
            >
              <h4>How do I submit my property for listing?</h4>
            </div>

            <div
              id="collapseOne"
              class="accordion-collapse collapse"
              aria-labelledby="headingOne"
              data-bs-parent="#faqAccordion"
            >
              <div class="accordion-body">
                To submit your property, simply click on the “Submit Your
                Listing” button, provide your property details, and we’ll post
                it on<br> our platform. It’s that easy!
              </div>
            </div>
          </div>

          <div class="accordion-item">
            <div
              class="accordion-button collapsed"
              data-bs-toggle="collapse"
              data-bs-target="#collapseTwo"
              aria-expanded="false"
              aria-controls="collapseTwo"
            >
              <h4>How often can I post my listing?</h4>
            </div>

            <div
              id="collapseTwo"
              class="accordion-collapse collapse"
              aria-labelledby="headingTwo"
              data-bs-parent="#faqAccordion"
            >
              <div class="accordion-body">
                You can post your listing as often as you’d like, depending on
                availability.
              </div>
            </div>
          </div>

          <div class="accordion-item">
            <div
              class="accordion-button collapsed"
              data-bs-toggle="collapse"
              data-bs-target="#collapseThree"
              aria-expanded="false"
              aria-controls="collapseThree"
            >
              <h4>What types of properties can I list?</h4>
            </div>

            <div
              id="collapseThree"
              class="accordion-collapse collapse"
              aria-labelledby="headingThree"
              data-bs-parent="#faqAccordion"
            >
              <div class="accordion-body">
                You can list residential, commercial, and land properties on our
                platform.
              </div>
            </div>
          </div>

          <div class="accordion-item">
            <div
              class="accordion-button collapsed"
              data-bs-toggle="collapse"
              data-bs-target="#collapseFour"
              aria-expanded="false"
              aria-controls="collapseFour"
            >
              <h4>How do you help me find tenants?</h4>
            </div>

            <div
              id="collapseFour"
              class="accordion-collapse collapse"
              aria-labelledby="headingFour"
              data-bs-parent="#faqAccordion"
            >
              <div class="accordion-body">
                We provide tools and resources to connect you with potential
                tenants through our platform.
              </div>
            </div>
          </div>

          <div class="accordion-item">
            <div
              class="accordion-button collapsed"
              data-bs-toggle="collapse"
              data-bs-target="#collapseFive"
              aria-expanded="false"
              aria-controls="collapseFive"
            >
              <h4>Can I remove my listing if my property gets rented?</h4>
            </div>

            <div
              id="collapseFive"
              class="accordion-collapse collapse"
              aria-labelledby="headingFive"
              data-bs-parent="#faqAccordion"
            >
              <div class="accordion-body">
                  Yes, you can remove your listing anytime once your property is
                  rented.
              </div>
            </div>
          </div>

          <div class="accordion-item">
            <div
              class="accordion-button collapsed"
              data-bs-toggle="collapse"
              data-bs-target="#collapseSix"
              aria-expanded="false"
              aria-controls="collapseSix"
            >
              <h4>Do you offer support for renters as well?</h4>
            </div>

            <div
              id="collapseSix"
              class="accordion-collapse collapse"
              aria-labelledby="headingSix"
              data-bs-parent="#faqAccordion"
            >
              <div class="accordion-body">
                Yes, we offer assistance to renters to help them find suitable
                properties.
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>

    <section class="contact" id="contact">
      <div class="container">
        <div class="title-wrp">
          <div class="sec-title-sub">CONTACT US</div>
          <div class="secondary-sec-title">
            CONTACT OUR TEAM WE WILL GUIDE YOU
          </div>
          <div class="sub-txt">
            Lorem Ipsum is simply dummy text of the printing and typesetting
            industry.
          </div>
        </div>
        <div class="form-blk">
          <!-- <form class="form" action="">
            <div class="row">
              <div class="col-lg-12">
                <div class="form-group">
                  <label for="" class="form-label">Name</label>
                  <input
                    type="text"
                    name=""
                    id=""
                    class="form-control"
                    placeholder="Enter your name"
                  />
                </div>
              </div>
            </div>
            <div class="row">
              <div class="col-lg-6">
                <div class="form-group">
                  <label for="" class="form-label">Email ID</label>
                  <input
                    type="text"
                    name=""
                    id=""
                    class="form-control"
                    placeholder="Enter Email Id"
                  />
                </div>
              </div>
              <div class="col-lg-6">
                <div class="form-group">
                  <label for="" class="form-label">Phone Number</label>
                  <input
                    type="text"
                    name=""
                    id=""
                    class="form-control"
                    placeholder="+91 0000 0000 00"
                  />
                </div>
              </div>
            </div>
            <div class="row">
              <div class="col-lg-12">
                <div class="form-group">
                  <label for="" class="form-label">Message</label>
                  <input
                    type="text"
                    name=""
                    id=""
                    class="form-control"
                    placeholder="Type here"
                  />
                </div>
                <button class="btn btn-primary btn-submit">Submit</button>
              </div>
            </div>
          </form> -->
          <?php echo do_shortcode('[custom_contact_form]');?>
          
        </div>
      </div>
      <div class="img-lft">
        <img src="<?php echo get_template_directory_uri(); ?>/img/contact-img.png" alt="" />
        <a class="contact-btn" href="tel:+91 0000 000 000"
          ><span class="icon"><img src="<?php echo get_template_directory_uri(); ?>/img/tele-icon.svg" alt="" /></span>(+91)
          0000 000 000</a
        >
      </div>
    </section>
    <section class="news-sec">
    <div class="container">
        <div class="newsletter-section">
            <h2 class="newsletter-heading">SUBSCRIBE TO OUR NEWSLETTER</h2>
            <p class="newsletter-content">
                Lorem Ipsum is simply dummy text of the printing and typesetting industry.<br />
                Lorem Ipsum has been.
            </p>

            <form class="newsletter-form" id="newsletter-form">
                <input type="email" id="newsletter-email" class="newsletter-input" placeholder="Enter Your Email Here" />
                <button type="submit" class="newsletter-button">Subscribe</button>
            </form>

            <div id="newsletter-message" style="display:none;"></div>
        </div>
    </div>
</section>

<?php get_footer(); ?>