Fix duplicate headers on agents archive page

- Removed subtitle from hero section (title only)
- Replaced section-header with simpler page-intro component
- Combined intro text with agent count display
- Updated SCSS with page-intro styles

🤖 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 19:25:07 -06:00
parent 3998623fc7
commit 1344d994be
3 changed files with 25 additions and 23 deletions
+11 -7
View File
@@ -28,7 +28,7 @@ foreach ($all_agents as $agent) {
$order = get_field('agent_order', $agent->ID); $order = get_field('agent_order', $agent->ID);
$agents_data[] = [ $agents_data[] = [
'post' => $agent, 'post' => $agent,
'order' => $order ? (int) $order : 10, // Default to 10 if not set 'order' => $order ? (int) $order : 10,
]; ];
} }
@@ -39,24 +39,28 @@ usort($agents_data, function($a, $b) {
} }
return strcmp($a['post']->post_title, $b['post']->post_title); return strcmp($a['post']->post_title, $b['post']->post_title);
}); });
$agent_count = count($agents_data);
?> ?>
<main id="primary" class="site-main Agents_Archive"> <main id="primary" class="site-main Agents_Archive">
<?php <?php
// Hero Section // Hero Section - title only, subtitle below in content area
get_template_part('template-parts/components/hero-section', null, array( get_template_part('template-parts/components/hero-section', null, array(
'title' => 'Our Team', 'title' => 'Our Team',
'subtitle' => 'Meet the dedicated professionals ready to help you find your perfect property.',
'size' => 'small', 'size' => 'small',
)); ));
?> ?>
<section class="agents-section"> <section class="agents-section">
<div class="container"> <div class="container">
<header class="section-header"> <!-- Page intro -->
<h2 class="section-header-title">Meet Our Agents</h2> <div class="page-intro">
<p class="section-header-subtitle">Our experienced team is here to guide you through every step of your real estate journey.</p> <p class="page-intro-text">Meet the dedicated professionals ready to help you find your perfect property. Our experienced team is here to guide you through every step of your real estate journey.</p>
</header> <?php if ($agent_count > 0) : ?>
<p class="page-intro-count"><?php echo $agent_count; ?> Agent<?php echo $agent_count !== 1 ? 's' : ''; ?></p>
<?php endif; ?>
</div>
<?php if (!empty($agents_data)) : ?> <?php if (!empty($agents_data)) : ?>
<div class="agents-grid"> <div class="agents-grid">
File diff suppressed because one or more lines are too long
@@ -9,8 +9,8 @@
padding: 4rem 0; padding: 4rem 0;
} }
// Section Header // Page Intro
.section-header { .page-intro {
text-align: center; text-align: center;
max-width: 700px; max-width: 700px;
margin: 0 auto 3rem; margin: 0 auto 3rem;
@@ -18,28 +18,26 @@
border-bottom: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
} }
.section-header-title { .page-intro-text {
font-family: var(--font-display);
font-size: 2rem;
margin-bottom: 0.75rem;
color: var(--color-text);
@media (min-width: 768px) {
font-size: 2.5rem;
}
}
.section-header-subtitle {
font-size: 1rem; font-size: 1rem;
color: var(--color-text-muted); color: var(--color-text-muted);
line-height: 1.6; line-height: 1.6;
margin-bottom: 0; margin-bottom: 1rem;
@media (min-width: 768px) { @media (min-width: 768px) {
font-size: 1.125rem; font-size: 1.125rem;
} }
} }
.page-intro-count {
font-size: 0.875rem;
color: var(--color-accent);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 0;
}
// Agents Grid // Agents Grid
.agents-grid { .agents-grid {
display: grid; display: grid;