seo: Incorrect title format
I’m not sure if I’m doing anything wrong, but when when i use dafault title format in plugin settings, which is this:
{title} - {{sitename}}
My title for entries is generated like this:
site name - site name
And when i switch lock icon on `{title} - so its locked, title changes to this:
- site name
Shouldn’t default title config use current entry title?
Plugin also ignores completly what i set in entry-specific seo field as far as title goes.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 17 (1 by maintainers)
Nm. I’m an idiot. I had the handle set different than ‘seo’ from {% hook ‘seo’ %}
Figured it out. There’s a difference between the Field settings and the SEO settings. It’s a bit confusing.
ugh… my bad. I feel like this a solid RTFM moment for me. Thank you for taking the time and effort to post this @alexjcollins !!
@wooge The
{% hook 'seo' %}
tag will look for a field with the handleseo
on the entry you’re viewing. So, you’ll want to go to the field settings to adjust the variables included in the meta.If you don’t have a field called
seo
on the entry, you’ll want to create that first. Here’s an example from one of our sites.I have found perhaps the issue I was having is not the same as this. I understood that I only needed to add the SEO field if I wanted to be able to set custom attributes per page. I did not need to so I just installed the plugin and added the “{% hook “seo” %}” part into my template. The result was instead of “Site name - page title” I just got “Site name - Site name”. I have now realised that you need to add the SEO field to entries for it to work correctly, even if you do not want/need to be able to set page titles in the entry edit page.