cbeca7c6d8
Property details page: - Move address to header above gallery - Add property type badges (blue residential, red commercial) - Gallery autoplay with play/pause button, 5-second interval - Fade transitions for autoplay, slide transitions for swipe - Thumbnail navigation with sync - Swipe support in gallery and lightbox - Widget titles: 18px Times New Roman bold - Remove breadcrumbs Layout and styling: - Container width: 1400px - Contact page map 50% taller (375px) - Contact info labels: Times New Roman 16px - Agent photo backgrounds solid black - CTA accent button hover: black text Clickable components: - Service cards fully clickable with stretched links - Resource cards fully clickable with stretched links - Addresses link to Google Maps (contact page, footer) Footer updates: - Add Send Us a Message link with paper airplane icon - Replace credentials with legal section - Privacy Policy, Fair Housing, MLS Disclaimer, Brokerage Disclosure links - Credits: Web Design by HansonXyz Other: - Install Classic Editor plugin 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
214 lines
7.9 KiB
PHP
Executable File
214 lines
7.9 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* The template for displaying the homepage
|
|
*
|
|
* @package HomeProz
|
|
*/
|
|
|
|
// Prevent direct access
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
get_header();
|
|
|
|
// Get featured residential properties (3 most recent active residential listings)
|
|
$featured_residential = new WP_Query(array(
|
|
'post_type' => 'property',
|
|
'posts_per_page' => 3,
|
|
'tax_query' => array(
|
|
'relation' => 'AND',
|
|
array(
|
|
'taxonomy' => 'property_status',
|
|
'field' => 'slug',
|
|
'terms' => 'active',
|
|
),
|
|
array(
|
|
'taxonomy' => 'property_type',
|
|
'field' => 'slug',
|
|
'terms' => 'residential',
|
|
),
|
|
),
|
|
'orderby' => 'date',
|
|
'order' => 'DESC',
|
|
));
|
|
|
|
// Get featured commercial/land properties (3 most recent active commercial or land listings)
|
|
$featured_commercial = new WP_Query(array(
|
|
'post_type' => 'property',
|
|
'posts_per_page' => 3,
|
|
'tax_query' => array(
|
|
'relation' => 'AND',
|
|
array(
|
|
'taxonomy' => 'property_status',
|
|
'field' => 'slug',
|
|
'terms' => 'active',
|
|
),
|
|
array(
|
|
'taxonomy' => 'property_type',
|
|
'field' => 'slug',
|
|
'terms' => array('commercial', 'land'),
|
|
),
|
|
),
|
|
'orderby' => 'date',
|
|
'order' => 'DESC',
|
|
));
|
|
?>
|
|
|
|
<main id="primary" class="site-main homepage-main">
|
|
|
|
<?php
|
|
// Hero images
|
|
$hero_image_split = homeproz_get_transformed_theme_image('assets/images/hero-original.png', 30, 2560, 90);
|
|
$hero_image_card = homeproz_get_transformed_theme_image('assets/images/hero-original.png', 35, 2560, 90);
|
|
$fallback_image = get_template_directory_uri() . '/assets/images/hero.webp';
|
|
$logo_cropped = get_template_directory_uri() . '/assets/images/logo-cropped.webp';
|
|
|
|
// Build gallery images array for desktop hero rotation
|
|
// Include the original hero plus the 5 additional gallery images
|
|
$gallery_source_images = array(
|
|
'assets/images/hero-original.png',
|
|
'assets/images/hero-gallery/hero-2.png',
|
|
'assets/images/hero-gallery/hero-3.png',
|
|
'assets/images/hero-gallery/hero-4.jpg',
|
|
'assets/images/hero-gallery/hero-5.png',
|
|
'assets/images/hero-gallery/hero-6.png',
|
|
);
|
|
|
|
$gallery_images = array();
|
|
foreach ($gallery_source_images as $source) {
|
|
$transformed = homeproz_get_transformed_theme_image($source, 30, 2560, 90);
|
|
if ($transformed) {
|
|
$gallery_images[] = $transformed;
|
|
}
|
|
}
|
|
|
|
// Design 2: Two-column split (shown >= 1450px)
|
|
?>
|
|
<div class="hero-desktop-only">
|
|
<?php
|
|
get_template_part('template-parts/components/hero-section', null, array(
|
|
'logo' => $logo_cropped,
|
|
'title' => 'Find Your Dream Home Today',
|
|
'subtitle' => 'Expert real estate services for buyers and sellers in Albert Lea and the surrounding Minnesota communities.',
|
|
'show_location_search' => true,
|
|
'primary_cta_text' => 'View All Properties',
|
|
'primary_cta_url' => home_url('/properties/'),
|
|
'primary_cta_icon' => 'map',
|
|
'secondary_cta_text' => 'Contact Us',
|
|
'secondary_cta_url' => home_url('/contact/'),
|
|
'background_image' => $hero_image_split ?: $fallback_image,
|
|
'gallery_images' => $gallery_images,
|
|
'size' => 'large',
|
|
));
|
|
?>
|
|
</div>
|
|
|
|
<?php
|
|
// Design 1: Card overlay (shown < 1450px)
|
|
?>
|
|
<div class="hero-mobile-only">
|
|
<?php
|
|
get_template_part('template-parts/components/hero-section-card', null, array(
|
|
'logo' => $logo_cropped,
|
|
'title' => 'Find Your Dream Home Today',
|
|
'subtitle' => 'Expert real estate services for buyers and sellers in Albert Lea and the surrounding Minnesota communities.',
|
|
'show_location_search' => true,
|
|
'primary_cta_text' => 'View All Properties',
|
|
'primary_cta_url' => home_url('/properties/'),
|
|
'primary_cta_icon' => 'map',
|
|
'secondary_cta_text' => 'Contact Us',
|
|
'secondary_cta_url' => home_url('/contact/'),
|
|
'background_image' => $hero_image_card ?: $fallback_image,
|
|
'size' => 'large',
|
|
));
|
|
?>
|
|
</div>
|
|
|
|
<?php
|
|
// Service Cards Section (Buy/Rent/Sell)
|
|
get_template_part('template-parts/components/service-cards');
|
|
?>
|
|
|
|
<!-- Featured Residential Properties Section -->
|
|
<section class="featured-properties-section">
|
|
<div class="container">
|
|
<header class="section-header">
|
|
<h2 class="section-title">Featured Homes</h2>
|
|
<p class="section-subtitle">Browse our residential properties for sale</p>
|
|
</header>
|
|
|
|
<?php if ($featured_residential->have_posts()) : ?>
|
|
<div class="property-grid property-grid--3col">
|
|
<?php
|
|
while ($featured_residential->have_posts()) :
|
|
$featured_residential->the_post();
|
|
get_template_part('template-parts/property/property-card');
|
|
endwhile;
|
|
wp_reset_postdata();
|
|
?>
|
|
</div>
|
|
|
|
<div class="section-footer">
|
|
<a href="<?php echo esc_url(home_url('/properties/?type=residential')); ?>" class="btn btn-secondary">
|
|
View All Residential
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
<path d="M5 12h14M12 5l7 7-7 7"/>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
<?php else : ?>
|
|
<p class="no-properties-message">No residential properties currently available. Please check back soon.</p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Featured Commercial & Land Properties Section -->
|
|
<section class="featured-properties-section featured-properties-section--alt">
|
|
<div class="container">
|
|
<header class="section-header">
|
|
<h2 class="section-title">Commercial & Land</h2>
|
|
<p class="section-subtitle">Explore commercial properties and land for sale</p>
|
|
</header>
|
|
|
|
<?php if ($featured_commercial->have_posts()) : ?>
|
|
<div class="property-grid property-grid--3col">
|
|
<?php
|
|
while ($featured_commercial->have_posts()) :
|
|
$featured_commercial->the_post();
|
|
get_template_part('template-parts/property/property-card');
|
|
endwhile;
|
|
wp_reset_postdata();
|
|
?>
|
|
</div>
|
|
|
|
<div class="section-footer">
|
|
<a href="<?php echo esc_url(home_url('/properties/?type=commercial,land')); ?>" class="btn btn-secondary">
|
|
View All Commercial
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
<path d="M5 12h14M12 5l7 7-7 7"/>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
<?php else : ?>
|
|
<p class="no-properties-message">No commercial properties currently available. Please check back soon.</p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
|
|
<?php
|
|
// Contact CTA Section
|
|
get_template_part('template-parts/components/cta-section', null, array(
|
|
'title' => 'Ready to Find Your Dream Home?',
|
|
'text' => 'Whether you\'re buying or selling, our team is here to help you every step of the way.',
|
|
'button_text' => 'Contact Us Today',
|
|
'button_url' => home_url('/contact/'),
|
|
'style' => 'accent',
|
|
));
|
|
?>
|
|
|
|
</main>
|
|
|
|
<?php
|
|
get_footer();
|