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' );
|
$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
|
// Check conditions for displaying the hero section.
|
||||||
$showHero = in_array(
|
// The inner-page hero renders only on the Services page, its direct children,
|
||||||
true,
|
// and its grandchildren. All other views (blog index, archives, single posts,
|
||||||
array(
|
// search, 404) render without the hero.
|
||||||
isServicesDescendant() && get_field( 'hero_style' ) === 'default',
|
$showHero = isServicesDescendant() && get_field( 'hero_style' ) === 'default';
|
||||||
is_home(),
|
|
||||||
is_archive(),
|
|
||||||
is_single(),
|
|
||||||
is_search(),
|
|
||||||
is_404(),
|
|
||||||
),
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user