Closed tadesign closed 7 years ago
Thanks Richard for your feedback.
This behavior is actually on purpose, as if you write something in the "Google Title" Fields, it will override completely the page title, and it won't display the site name after the pipe symbol.
Your solution works if you want indeed to display your site name, even when the title is modified manually.
Hope it helps!
Hi Paul,
No problem. I'm just so used to the Title name pipe then site name format that I wasn't sure if it was an error or not. Thank you for getting back to me.
Many Thanks Richard
worth to mention that you could also use twig var for this field, something like
My new article | {{ site.title }}
Note that you would have to enable "process twig"
Hi,
Thanks for the great plugin. I only have a minor issue (and possibly a solution) Currently the
<title>Google title - Words - More Words</title>
and not
<title>Google title - Words - More Words | Site Name</title>
To fix this I edited the partials file seo_data.html.twig so the title field line is changed from:
<title>{% if page.header.googletitle is defined and not empty %}{{ page.header.googletitle}}{% else %}{{ page.title }} | {{ site.title }}{% endif %}</title>
to
<title>{% if page.header.googletitle is defined and not empty %}{{ page.header.googletitle}}{% else %}{{ page.title }}{% endif %} | {{ site.title|e('html') }}</title>
This works for myself, I don't know if this is an issue specific to my custom theme or if my change would affect other themes.
Many Thanks Richard