fix(hero): remove non-Services bypasses so the hero only renders for Services descendants

This commit is contained in:
Keith Solomon
2026-07-04 19:52:33 -05:00
parent 0a19256310
commit 2fb1d67bb0
+5 -13
View File
@@ -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';
?>