diff --git a/header.php b/header.php index 1fb8e95..d091c0c 100644 --- a/header.php +++ b/header.php @@ -12,19 +12,11 @@ global $views; $headerLogo = getFieldValue( 'header.header_logo.url' ) ? getFieldValue( 'header.header_logo.url' ) : get_theme_file_uri( '/static/img/logo.svg' ); -// Check conditions for displaying the hero section -$showHero = in_array( - true, - array( - isServicesDescendant() && get_field( 'hero_style' ) === 'default', - is_home(), - is_archive(), - is_single(), - is_search(), - is_404(), - ), - true -); +// Check conditions for displaying the hero section. +// The inner-page hero renders only on the Services page, its direct children, +// and its grandchildren. All other views (blog index, archives, single posts, +// search, 404) render without the hero. +$showHero = isServicesDescendant() && get_field( 'hero_style' ) === 'default'; ?>