Skip to content

Kirby 4.4.1

$site->changeTitle()

Change the site title

$site->changeTitle(string $title, ?string $languageCode = null): Kirby\Cms\Site

Parameters

Name Type Default
$title * string
$languageCode string|null null

Return type

Kirby\Cms\Site

This method does not modify the existing $site object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Cms\Site

Example

<?php
$kirby->impersonate('kirby');

$newSite = $site->changeTitle('My shiny new site title');
echo $newSite->title();