Refine hero and header branding display
This commit is contained in:
+3
-1
@@ -4,12 +4,14 @@ $video_id = absint( get_theme_mod( 'c1024_2026_hero_video' ) );
|
||||
$video_url = $video_id ? wp_get_attachment_url( $video_id ) : '';
|
||||
$hero_title = get_theme_mod( 'c1024_2026_hero_title', get_bloginfo( 'name' ) );
|
||||
$hero_text = get_theme_mod( 'c1024_2026_hero_text' );
|
||||
// The site subtitle complements the Customizer-controlled hero headline.
|
||||
$site_description = get_bloginfo( 'description', 'display' );
|
||||
?>
|
||||
<?php // Keep the hero available for text-only configurations when no video is selected.
|
||||
if ( $video_url || $hero_title || $hero_text ) { ?>
|
||||
<section class="hero" aria-label="<?php esc_attr_e( 'Introduction', 'c1024-2026' ); ?>">
|
||||
<?php if ( $video_url ) { ?><video class="hero-video" autoplay muted loop playsinline><source src="<?php echo esc_url( $video_url ); ?>" type="<?php echo esc_attr( get_post_mime_type( $video_id ) ); ?>"></video><?php } ?>
|
||||
<div class="hero-content"><div class="hero-eyebrow"><?php bloginfo( 'name' ); ?></div><?php if ( $hero_title ) { ?><h1 class="hero-title"><?php echo esc_html( $hero_title ); ?></h1><?php } ?><?php if ( $hero_text ) { ?><p class="hero-text"><?php echo esc_html( $hero_text ); ?></p><?php } ?></div>
|
||||
<div class="hero-content"><?php if ( $site_description ) { ?><div class="hero-eyebrow"><?php echo esc_html( $site_description ); ?></div><?php } ?><?php if ( $hero_title ) { ?><h1 class="hero-title"><?php echo esc_html( $hero_title ); ?></h1><?php } ?><?php if ( $hero_text ) { ?><p class="hero-text"><?php echo esc_html( $hero_text ); ?></p><?php } ?></div>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<main id="main" class="site-main">
|
||||
|
||||
Reference in New Issue
Block a user