Skip to content

Kirby 3.9.8

$page->isHomePage()

Checks if the page is the home page

$page->isHomePage(): bool

Return type

bool

Parent class

Kirby\Cms\Page

Example

A custom title for the homepage

<?php if($page->isHomePage()): ?>
<title>Welcome to my website</title>
<?php else: ?>
<title><?= html($page->title() . ' / ' . $site->title()) ?></title>
<?php endif ?>