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:
@@ -28,7 +28,7 @@ foreach ($all_agents as $agent) {
|
||||
$order = get_field('agent_order', $agent->ID);
|
||||
$agents_data[] = [
|
||||
'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);
|
||||
});
|
||||
|
||||
$agent_count = count($agents_data);
|
||||
?>
|
||||
|
||||
<main id="primary" class="site-main Agents_Archive">
|
||||
<?php
|
||||
// Hero Section
|
||||
// Hero Section - title only, subtitle below in content area
|
||||
get_template_part('template-parts/components/hero-section', null, array(
|
||||
'title' => 'Our Team',
|
||||
'subtitle' => 'Meet the dedicated professionals ready to help you find your perfect property.',
|
||||
'size' => 'small',
|
||||
));
|
||||
?>
|
||||
|
||||
<section class="agents-section">
|
||||
<div class="container">
|
||||
<header class="section-header">
|
||||
<h2 class="section-header-title">Meet Our Agents</h2>
|
||||
<p class="section-header-subtitle">Our experienced team is here to guide you through every step of your real estate journey.</p>
|
||||
</header>
|
||||
<!-- Page intro -->
|
||||
<div class="page-intro">
|
||||
<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>
|
||||
<?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)) : ?>
|
||||
<div class="agents-grid">
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -9,8 +9,8 @@
|
||||
padding: 4rem 0;
|
||||
}
|
||||
|
||||
// Section Header
|
||||
.section-header {
|
||||
// Page Intro
|
||||
.page-intro {
|
||||
text-align: center;
|
||||
max-width: 700px;
|
||||
margin: 0 auto 3rem;
|
||||
@@ -18,28 +18,26 @@
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.section-header-title {
|
||||
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 {
|
||||
.page-intro-text {
|
||||
font-size: 1rem;
|
||||
color: var(--color-text-muted);
|
||||
line-height: 1.6;
|
||||
margin-bottom: 0;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
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 {
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user