Add logo above hero title on homepage
- Added logo parameter to hero-section.php component - Added .hero-section-logo CSS (200px max-width, centered) - Updated front-page.php to pass logo.webp to hero 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -60,6 +60,7 @@ $featured_commercial = new WP_Query(array(
|
|||||||
<?php
|
<?php
|
||||||
// Hero Section with Location Search
|
// Hero Section with Location Search
|
||||||
get_template_part('template-parts/components/hero-section', null, array(
|
get_template_part('template-parts/components/hero-section', null, array(
|
||||||
|
'logo' => get_template_directory_uri() . '/assets/images/logo.webp',
|
||||||
'title' => 'Find Your Dream Home Today',
|
'title' => 'Find Your Dream Home Today',
|
||||||
'subtitle' => 'Expert real estate services for buyers and sellers in Albert Lea and the surrounding Minnesota communities.',
|
'subtitle' => 'Expert real estate services for buyers and sellers in Albert Lea and the surrounding Minnesota communities.',
|
||||||
'show_location_search' => true,
|
'show_location_search' => true,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
* @package HomeProz
|
* @package HomeProz
|
||||||
*
|
*
|
||||||
* Args:
|
* Args:
|
||||||
|
* - logo (string): Logo image URL to show above title
|
||||||
* - title (string): Hero headline
|
* - title (string): Hero headline
|
||||||
* - subtitle (string): Hero subheadline
|
* - subtitle (string): Hero subheadline
|
||||||
* - primary_cta_text (string): Primary button text
|
* - primary_cta_text (string): Primary button text
|
||||||
@@ -22,6 +23,7 @@ if (!defined('ABSPATH')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get args with defaults
|
// Get args with defaults
|
||||||
|
$logo = isset($args['logo']) ? $args['logo'] : '';
|
||||||
$title = isset($args['title']) ? $args['title'] : '';
|
$title = isset($args['title']) ? $args['title'] : '';
|
||||||
$subtitle = isset($args['subtitle']) ? $args['subtitle'] : '';
|
$subtitle = isset($args['subtitle']) ? $args['subtitle'] : '';
|
||||||
$primary_cta_text = isset($args['primary_cta_text']) ? $args['primary_cta_text'] : '';
|
$primary_cta_text = isset($args['primary_cta_text']) ? $args['primary_cta_text'] : '';
|
||||||
@@ -51,6 +53,10 @@ if ($show_location_search) {
|
|||||||
<div class="hero-section-overlay"></div>
|
<div class="hero-section-overlay"></div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="hero-section-content">
|
<div class="hero-section-content">
|
||||||
|
<?php if ($logo) : ?>
|
||||||
|
<img src="<?php echo esc_url($logo); ?>" alt="" class="hero-section-logo">
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($title) : ?>
|
<?php if ($title) : ?>
|
||||||
<h1 class="hero-section-title"><?php echo esc_html($title); ?></h1>
|
<h1 class="hero-section-title"><?php echo esc_html($title); ?></h1>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -66,6 +66,13 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hero-section-logo {
|
||||||
|
display: block;
|
||||||
|
max-width: 200px;
|
||||||
|
height: auto;
|
||||||
|
margin: 0 auto 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.hero-section-title {
|
.hero-section-title {
|
||||||
font-family: var(--font-display);
|
font-family: var(--font-display);
|
||||||
font-size: 3.5rem;
|
font-size: 3.5rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user