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>
207 lines
9.7 KiB
PHP
Executable File
207 lines
9.7 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Template Name: About Page
|
|
* Template for displaying the About/Team 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">
|
|
<img src="<?php echo esc_url(get_template_directory_uri() . '/assets/images/about-us.webp'); ?>" alt="HomeProz Real Estate Team">
|
|
</div>
|
|
<div class="about-story-content">
|
|
<?php
|
|
while (have_posts()) :
|
|
the_post();
|
|
the_content();
|
|
endwhile;
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Meet the Team Section -->
|
|
<section class="about-team-section Agents_Archive">
|
|
<div class="container">
|
|
<header class="about-team-header">
|
|
<h2 class="about-team-title">Meet Our Team</h2>
|
|
<p class="about-team-subtitle">A dedicated group of real estate professionals committed to your success</p>
|
|
</header>
|
|
|
|
<?php
|
|
// Query all published agents, then filter disabled and sort by order
|
|
$all_agents = get_posts([
|
|
'post_type' => 'agent',
|
|
'posts_per_page' => -1,
|
|
'post_status' => 'publish',
|
|
]);
|
|
|
|
// Filter out disabled agents and add sorting data
|
|
$agents_data = [];
|
|
foreach ($all_agents as $agent) {
|
|
$disabled = get_field('agent_disabled', $agent->ID);
|
|
if ($disabled) continue;
|
|
|
|
$order = get_field('agent_order', $agent->ID);
|
|
$agents_data[] = [
|
|
'post' => $agent,
|
|
'order' => $order ? (int) $order : 10,
|
|
];
|
|
}
|
|
|
|
// Sort by order, then by title
|
|
usort($agents_data, function($a, $b) {
|
|
if ($a['order'] !== $b['order']) {
|
|
return $a['order'] - $b['order'];
|
|
}
|
|
return strcmp($a['post']->post_title, $b['post']->post_title);
|
|
});
|
|
?>
|
|
|
|
<?php if (!empty($agents_data)) : ?>
|
|
<div class="agents-grid">
|
|
<?php foreach ($agents_data as $agent_item) :
|
|
$agent = $agent_item['post'];
|
|
$agent_id = $agent->ID;
|
|
$agent_phone = get_field('agent_phone', $agent_id);
|
|
$agent_email = get_field('agent_email', $agent_id);
|
|
$agent_title = get_field('agent_title', $agent_id);
|
|
$agent_short_bio = get_field('agent_short_bio', $agent_id);
|
|
$agent_permalink = get_permalink($agent_id);
|
|
|
|
// Get featured image
|
|
$agent_photo_id = get_post_thumbnail_id($agent_id);
|
|
$agent_photo_url = $agent_photo_id ? wp_get_attachment_image_url($agent_photo_id, 'medium_large') : '';
|
|
?>
|
|
<article class="agent-card-item">
|
|
<a href="<?php echo esc_url($agent_permalink); ?>" class="agent-card-link">
|
|
<div class="agent-card-image">
|
|
<?php if ($agent_photo_url) : ?>
|
|
<img src="<?php echo esc_url($agent_photo_url); ?>" alt="<?php echo esc_attr($agent->post_title); ?>">
|
|
<?php else : ?>
|
|
<div class="agent-card-placeholder">
|
|
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" aria-hidden="true">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
|
|
<circle cx="12" cy="7" r="4"/>
|
|
</svg>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="agent-card-content">
|
|
<?php if ($agent_title) : ?>
|
|
<p class="agent-card-title-label"><?php echo esc_html($agent_title); ?></p>
|
|
<?php endif; ?>
|
|
|
|
<h3 class="agent-card-name"><?php echo esc_html($agent->post_title); ?></h3>
|
|
|
|
<?php if ($agent_short_bio) : ?>
|
|
<p class="agent-card-bio"><?php echo esc_html($agent_short_bio); ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</a>
|
|
|
|
<div class="agent-card-actions">
|
|
<?php if ($agent_phone) : ?>
|
|
<a href="tel:<?php echo esc_attr(preg_replace('/[^0-9]/', '', $agent_phone)); ?>" class="agent-action-btn">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
|
|
</svg>
|
|
<span class="sr-only">Call</span>
|
|
</a>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($agent_email) : ?>
|
|
<a href="mailto:<?php echo esc_attr($agent_email); ?>" class="agent-action-btn">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
|
|
<polyline points="22,6 12,13 2,6"/>
|
|
</svg>
|
|
<span class="sr-only">Email</span>
|
|
</a>
|
|
<?php endif; ?>
|
|
|
|
<a href="<?php echo esc_url($agent_permalink); ?>" class="agent-action-btn agent-action-profile">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
|
|
<circle cx="12" cy="7" r="4"/>
|
|
</svg>
|
|
<span>Profile</span>
|
|
</a>
|
|
</div>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php else : ?>
|
|
<div class="no-agents-message">
|
|
<p>No team members to display at this time.</p>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Broker Information Section -->
|
|
<section class="about-broker-section">
|
|
<div class="container">
|
|
<div class="about-broker-content">
|
|
<h3 class="about-broker-title">Broker Information</h3>
|
|
<p class="about-broker-text">
|
|
HomeProz Real Estate operates as a DBA of Bridge Realty, MN.<br>
|
|
Licensed in the State of Minnesota.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<?php
|
|
// Contact CTA Section
|
|
get_template_part('template-parts/components/cta-section', null, array(
|
|
'title' => 'Ready to Work With Us?',
|
|
'text' => 'Contact our team today to start your real estate journey.',
|
|
'button_text' => 'Get in Touch',
|
|
'button_url' => home_url('/contact/'),
|
|
'style' => 'accent',
|
|
));
|
|
?>
|
|
|
|
</main>
|
|
|
|
<?php
|
|
get_footer();
|