Add Agent CPT with single-agent profile template

- Created Agent custom post type with ACF fields (phone, email, website, title, license, bio, gallery, social links repeater)
- Added single-agent.php template with modern profile layout: header with photo/contact buttons/social links, biography section, photo gallery, current listings, sidebar contact card
- Created single-agent.scss with responsive styling matching HomeProz dark theme
- Updated single-property.php sidebar: moved property header widget, added document downloads with primary button styling
- Imported 4 agents from homeprozrealestate.com with profile images
- Added agent scrape scripts for reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Hanson.xyz Dev
2025-11-30 18:38:49 -06:00
parent fd0693e526
commit ef12be70ca
535 changed files with 158585 additions and 77 deletions
+71 -26
View File
@@ -70,32 +70,6 @@ while (have_posts()) :
<!-- Gallery -->
<?php get_template_part('template-parts/property/property-gallery', null, array('gallery' => $gallery, 'property_id' => $property_id)); ?>
<!-- Property Header -->
<header class="property-header">
<div class="property-header-top">
<?php if ($status) : ?>
<span class="badge <?php echo esc_attr($status_class); ?>"><?php echo esc_html($status); ?></span>
<?php endif; ?>
<?php if ($type) : ?>
<span class="property-type"><?php echo esc_html($type); ?></span>
<?php endif; ?>
</div>
<h1 class="property-title"><?php echo esc_html(homeproz_format_price($price)); ?></h1>
<p class="property-address">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/>
<circle cx="12" cy="10" r="3"/>
</svg>
<?php echo esc_html($full_address); ?>
</p>
<?php if ($mls_number) : ?>
<p class="property-mls">MLS# <?php echo esc_html($mls_number); ?></p>
<?php endif; ?>
</header>
<!-- Property Specs -->
<?php if ($bedrooms || $bathrooms || $square_feet || $lot_size || $year_built || $garage) : ?>
<section class="property-specs-section">
@@ -222,6 +196,77 @@ while (have_posts()) :
<!-- Sidebar -->
<aside class="single-property-sidebar">
<!-- Property Header -->
<div class="sidebar-widget property-header-widget">
<div class="property-header-top">
<?php if ($status) : ?>
<span class="badge <?php echo esc_attr($status_class); ?>"><?php echo esc_html($status); ?></span>
<?php endif; ?>
<?php if ($type) : ?>
<span class="property-type"><?php echo esc_html($type); ?></span>
<?php endif; ?>
</div>
<h1 class="property-title"><?php echo esc_html(homeproz_format_price($price)); ?></h1>
<p class="property-address">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/>
<circle cx="12" cy="10" r="3"/>
</svg>
<?php echo esc_html($full_address); ?>
</p>
<?php if ($mls_number) : ?>
<p class="property-mls">MLS# <?php echo esc_html($mls_number); ?></p>
<?php endif; ?>
</div>
<!-- Property Documents -->
<div class="sidebar-widget property-documents-widget">
<h3 class="widget-title">Property Documents</h3>
<?php if ($property_documents && is_array($property_documents) && !empty($property_documents)) : ?>
<div class="sidebar-documents-list">
<?php foreach ($property_documents as $doc) :
if (!$doc['file']) continue;
$file = $doc['file'];
$label = $doc['label'] ?: $file['filename'];
$ext = strtoupper(pathinfo($file['filename'], PATHINFO_EXTENSION));
?>
<a href="<?php echo esc_url($file['url']); ?>" class="document-btn" target="_blank">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
</svg>
<span class="document-btn-label"><?php echo esc_html($label); ?></span>
<span class="document-btn-ext"><?php echo esc_html($ext); ?></span>
</a>
<?php endforeach; ?>
</div>
<?php else : ?>
<!-- Mock documents for display -->
<div class="sidebar-documents-list">
<a href="#" class="document-btn" onclick="return false;">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
</svg>
<span class="document-btn-label">Property Disclosure</span>
<span class="document-btn-ext">PDF</span>
</a>
<a href="#" class="document-btn" onclick="return false;">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
</svg>
<span class="document-btn-label">Floor Plan</span>
<span class="document-btn-ext">PDF</span>
</a>
</div>
<?php endif; ?>
</div>
<!-- Contact Agent -->
<?php get_template_part('template-parts/property/property-agent', null, array('agent' => $listing_agent, 'property_id' => $property_id)); ?>
</aside>
</div>