Files
homeproz/wp-content/themes/homeproz/page-resources.php
T
Hanson.xyz Dev cbeca7c6d8 UI/UX improvements: gallery autoplay, clickable cards, footer legal section
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>
2025-12-01 00:24:34 -06:00

158 lines
7.6 KiB
PHP

<?php
/**
* Template for the Resources landing page
*
* @package HomeProz
*/
// Prevent direct access
if (!defined('ABSPATH')) {
exit;
}
get_header();
// Get child pages (resource guides)
$resource_pages = get_pages(array(
'parent' => get_the_ID(),
'sort_column' => 'menu_order',
'sort_order' => 'ASC',
));
?>
<main id="primary" class="site-main resources-page-main">
<?php
// Get hero content from ACF (Page Hero fields) or defaults
$hero_title = get_field('hero_title') ?: 'Resources & Guides';
$hero_subtitle = get_field('hero_subtitle') ?: 'Everything you need to navigate the home buying and selling process';
$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>
<!-- Main Resources Section -->
<section class="resources-featured-section">
<div class="container">
<div class="resources-featured-grid">
<!-- Buyer's Guide -->
<div class="resource-featured-card">
<a href="<?php echo esc_url(home_url('/resources/buyers-guide/')); ?>" class="resource-card-link-overlay" aria-hidden="true" tabindex="-1"></a>
<div class="resource-featured-icon">
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
<polyline points="9 22 9 12 15 12 15 22"/>
</svg>
</div>
<h2 class="resource-featured-title">Buyer's Guide</h2>
<p class="resource-featured-description">
Ready to buy your first home or next property? Our comprehensive guide walks you through every step of the home buying process, from getting pre-approved to closing day.
</p>
<span class="btn btn-primary">
Read the Buyer's Guide
</span>
</div>
<!-- Seller's Guide -->
<div class="resource-featured-card">
<a href="<?php echo esc_url(home_url('/resources/sellers-guide/')); ?>" class="resource-card-link-overlay" aria-hidden="true" tabindex="-1"></a>
<div class="resource-featured-icon">
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
<rect x="2" y="7" width="20" height="14" rx="2" ry="2"/>
<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/>
<line x1="12" y1="11" x2="12" y2="17"/>
<line x1="9" y1="14" x2="15" y2="14"/>
</svg>
</div>
<h2 class="resource-featured-title">Seller's Guide</h2>
<p class="resource-featured-description">
Thinking about selling? Learn how to prepare your home for the market, price it right, and navigate the selling process to get the best possible return on your investment.
</p>
<span class="btn btn-primary">
Read the Seller's Guide
</span>
</div>
</div>
</div>
</section>
<!-- Additional Resources -->
<section class="resources-additional-section">
<div class="container">
<header class="section-header">
<h2 class="section-title">Additional Resources</h2>
<p class="section-subtitle">Helpful information for your real estate journey</p>
</header>
<div class="resources-additional-grid">
<div class="resource-card">
<a href="<?php echo esc_url(home_url('/resources/moving-checklist/')); ?>" class="resource-card-link-overlay" aria-hidden="true" tabindex="-1"></a>
<div class="resource-card-icon">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" 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"/>
<line x1="16" y1="13" x2="8" y2="13"/>
<line x1="16" y1="17" x2="8" y2="17"/>
<polyline points="10 9 9 9 8 9"/>
</svg>
</div>
<h3 class="resource-card-title">Moving Checklist</h3>
<p class="resource-card-description">A comprehensive checklist to help you stay organized during your move.</p>
</div>
<div class="resource-card">
<a href="<?php echo esc_url(home_url('/resources/mortgage-calculator/')); ?>" class="resource-card-link-overlay" aria-hidden="true" tabindex="-1"></a>
<div class="resource-card-icon">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
<rect x="1" y="4" width="22" height="16" rx="2" ry="2"/>
<line x1="1" y1="10" x2="23" y2="10"/>
</svg>
</div>
<h3 class="resource-card-title">Mortgage Calculator</h3>
<p class="resource-card-description">Estimate your monthly payments and determine how much home you can afford.</p>
</div>
<div class="resource-card">
<a href="<?php echo esc_url(home_url('/resources/faq/')); ?>" class="resource-card-link-overlay" aria-hidden="true" tabindex="-1"></a>
<div class="resource-card-icon">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
<circle cx="12" cy="12" r="10"/>
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
<line x1="12" y1="17" x2="12.01" y2="17"/>
</svg>
</div>
<h3 class="resource-card-title">FAQ</h3>
<p class="resource-card-description">Answers to commonly asked questions about buying and selling real estate.</p>
</div>
</div>
</div>
</section>
<?php
// Contact CTA Section
get_template_part('template-parts/components/cta-section', null, array(
'title' => 'Have Questions?',
'text' => 'Our experienced agents are here to help you navigate the real estate process. Reach out anytime.',
'button_text' => 'Contact Us',
'button_url' => home_url('/contact/'),
'style' => 'accent',
));
?>
</main>
<?php
get_footer();