hook_block_view_alter() is not invoked I am trying to change the way "Search results" header is rendered in D8. Unfortunately HTML is hardcoded in SearchController and not themeable. I figured I could use hook_block_view_alter to change the $build['search_results_title'], but the hook implementation from my theme never gets called:

function labweb_block_view_alter(array &amp;$build, \Drupal\Core\Block\BlockPluginInterface $block) {
  if (isset($build['search_results_title'])) {
    unset($build['search_results_title']);
  }
  kpr($build);
}


Any ideas? It seems that this hook never gets called...
...but the hook implementation from my theme never gets called:

hook_block_view_alter() will not be called for themes; it is invoked only for modules. This is why your hook is never invoked.
To implement this hook, you need to create a custom module. If you need help to create a module you can check here to start.
I strongly suggest to read block_view_alter docs too.
Look at Theme Hooks to see what you can 'hook' in your theme.
For more information about hooks look here.