How to change title via hook threads?

File in the active theme MyTheme.theme prescribed

function MyTheme_preprocess_page_title(&$variables) {
$variables['title'] = 'TEST';
}

Why can not work, tell me? As if the hook just doesn't work.
March 19th 20 at 09:18
1 answer
March 19th 20 at 09:20
So it's you and not the hook. The hook should be called function MyTheme_preprocess_page(&$variables) otherwise it Drupal not rasarit.

Find more questions by tags Drupal