🐞 fix: Make Services pages show the correct hero
This commit is contained in:
+2
-1
@@ -16,8 +16,9 @@ $headerLogo = getFieldValue( 'header.header_logo.url' ) ? getFieldValue( 'header
|
||||
// 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';
|
||||
$services = get_page_by_path( 'services' )->ID;
|
||||
|
||||
$showHero = $post->post_parent === $services ? true : false;
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
Reference in New Issue
Block a user