b6df4dbb92
MLS plugin fixes from this session: - Fix silent insert failures: location column NOT NULL was rejecting wpdb->insert calls, causing ~18k new properties since Dec 2025 to be lost. Inserts now build raw SQL with ST_PointFromText so the spatial column is populated atomically. - Auto-refresh expired media URLs in MLS_Media_Handler::fetch_and_cache(), guarded by a property-level GET_LOCK so concurrent fetches share one API refresh. - Normalize WP_Error to null in mls_get_property_image() so callers can rely on the documented string|null contract. - Support comma-separated property_type filters in MLS_Query and MLS_Cluster so the homepage "View All Commercial" link (?property_type=Commercial+Sale,Land,Farm) actually filters correctly. - Incremental sync now looks back 10 minutes past the latest modification timestamp as a safety margin against missed records. - Smart sync exits silently (info-level, not warning) when a full sync is in progress. Operational: - New cron: weekly full sync Sundays at 3 AM (/usr/local/bin/mls-full-sync). - New cron: hourly 2GB cap on mls-thumbnails/ and cache/transformed-images/ (/usr/local/bin/mls-image-cache-cap). - Logrotate config for wp-content/debug.log (2-day retention, daily rotation, delaycompress). Repo policy: - CLAUDE.md updated with explicit "commit everything except build artifacts" policy. - .gitignore: untrack runtime image caches and debug.log rotations. Other modifications in this snapshot are pre-existing in-flight theme/plugin/db_content_updates work. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
107 lines
4.3 KiB
PHP
Executable File
107 lines
4.3 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Template Name: About Page
|
|
* Template for displaying the About page
|
|
*
|
|
* @package HomeProz
|
|
*/
|
|
|
|
// Prevent direct access
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
get_header();
|
|
?>
|
|
|
|
<main id="primary" class="site-main about-page-main">
|
|
|
|
<?php
|
|
// Get hero content from ACF (Page Hero fields) or defaults
|
|
$hero_title = get_field('hero_title') ?: 'About HomeProz';
|
|
$hero_subtitle = get_field('hero_subtitle') ?: 'Your trusted real estate partner in Albert Lea and surrounding Minnesota communities.';
|
|
$hero_bg = get_field('hero_background');
|
|
$has_bg_class = $hero_bg ? 'has-background' : '';
|
|
$bg_style = $hero_bg ? 'style="background-image: url(' . esc_url($hero_bg) . ');"' : '';
|
|
?>
|
|
<!-- Archive Hero -->
|
|
<section class="archive-hero <?php echo esc_attr($has_bg_class); ?>" <?php echo $bg_style; ?>>
|
|
<?php if ($hero_bg) : ?>
|
|
<div class="archive-hero-overlay"></div>
|
|
<?php endif; ?>
|
|
<div class="container">
|
|
<h1 class="archive-hero-title"><?php echo esc_html($hero_title); ?></h1>
|
|
<?php if ($hero_subtitle) : ?>
|
|
<p class="archive-hero-subtitle"><?php echo esc_html($hero_subtitle); ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Company Story Section -->
|
|
<section class="about-story-section">
|
|
<div class="container">
|
|
<div class="about-story-layout">
|
|
<div class="about-story-image">
|
|
<?php
|
|
$about_image = get_field('about_featured_image');
|
|
$about_image_url = $about_image ?: get_template_directory_uri() . '/assets/images/about-us.webp';
|
|
?>
|
|
<img src="<?php echo esc_url($about_image_url); ?>" alt="HomeProz Real Estate">
|
|
</div>
|
|
<div class="about-story-content">
|
|
<?php
|
|
while (have_posts()) :
|
|
the_post();
|
|
if (get_the_content()) :
|
|
the_content();
|
|
else :
|
|
// Default content if page body is empty
|
|
?>
|
|
<h2>Our Story</h2>
|
|
<p>HomeProz Real Estate was founded with a simple mission: to provide exceptional real estate services to the Albert Lea area and surrounding Minnesota and Iowa communities. We believe that buying or selling a home should be an exciting journey, not a stressful experience.</p>
|
|
<h2>Our Mission</h2>
|
|
<p>We are dedicated to helping families find their dream homes and sellers achieve the best possible results. Our team combines deep local knowledge with a commitment to personalized service, ensuring every client receives the attention they deserve.</p>
|
|
<p>Whether you're a first-time homebuyer, looking to upgrade, or ready to sell, our experienced agents are here to guide you every step of the way.</p>
|
|
<?php
|
|
endif;
|
|
endwhile;
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<?php
|
|
// Additional Content Section (from ACF field)
|
|
$additional_content = get_field('about_additional_content');
|
|
if ($additional_content) :
|
|
?>
|
|
<section class="about-content-section">
|
|
<div class="container">
|
|
<div class="about-additional-content">
|
|
<?php echo wp_kses_post($additional_content); ?>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<?php endif; ?>
|
|
|
|
<?php
|
|
// Contact CTA Section
|
|
$cta_title = get_field('about_cta_title') ?: 'Ready to Work With Us?';
|
|
$cta_text = get_field('about_cta_text') ?: 'Contact our team today to start your real estate journey.';
|
|
$cta_button_text = get_field('about_cta_button_text') ?: 'Get in Touch';
|
|
$cta_button_url = get_field('about_cta_button_url') ?: home_url('/contact/');
|
|
get_template_part('template-parts/components/cta-section', null, array(
|
|
'title' => $cta_title,
|
|
'text' => $cta_text,
|
|
'button_text' => $cta_button_text,
|
|
'button_url' => $cta_button_url,
|
|
'style' => 'accent',
|
|
));
|
|
?>
|
|
|
|
</main>
|
|
|
|
<?php
|
|
get_footer();
|