fix(hero): remove non-Services bypasses so the hero only renders for Services descendants
This commit is contained in:
+5
-13
@@ -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';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user