0

Now I have this:

enter image description here

Here i found information how to change this text to anything else: https://www.drupal.org/forum/support/post-installation/2016-09-20/change-site-title-in-drupal-8

I tried:

enter image description here

But it doesn't help.

Drupal is 8.4.2

And it works on 8.0.6

1
  • Easiest way to fix this is use Metatag.
    – Kevin
    Dec 13, 2017 at 19:19

1 Answer 1

2

Drupal by default will put the site name at the end of the page title but specific themes might change this.

if you want to override this your best bet is to use https://www.drupal.org/project/metatag module and override appropriate settings

There is a setting for first page or for all content types or specific content types; it very configurable.

Or you might do it programmatically in your THEMENAME.theme file:

function THEMENAME_preprocess_html(&$variables) {       
    $variables['head_title']['name'] = "Another Name";
}

To take away the | you have to create a new html.html.twig template in your custom theme and modify (copy paste it from the theme you are overriding)

    <title>{{ head_title|safe_join(' | ') }}</title>

to something like this

    <title>{{ head_title|safe_join('  ') }}</title>
6
  • Why Should I install a plugin for just change site title? But, yes, this works.
    – Crantisz
    Dec 13, 2017 at 19:38
  • @Crantisz so you don't have to re-invent the wheel and also Metatag is used for SEO.
    – No Sssweat
    Dec 13, 2017 at 20:09
  • It’s possible a theme or module did that. Metatag solves those woes easily, and a whole lot more.
    – Kevin
    Dec 13, 2017 at 22:45
  • Unfortunately metatag plugin change title only on front page...
    – Crantisz
    Dec 13, 2017 at 23:13
  • Did you change the global defaults? Something else is really wrong here then, otherwise.
    – Kevin
    Dec 14, 2017 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.