nystudio107 / craft-webperf

Webperf helps you build & maintain high quality websites through Real User Measurement of your website's performance
https://nystudio107.com/plugins/webperf
Other
25 stars 2 forks source link

Removing redundant title tags #48

Closed keithmarszalek closed 1 year ago

keithmarszalek commented 1 year ago

Question

We are using SEOMatic and are having issues with it replicating title title tags on pages. How do we turn off the SEOMatic Title tag insert?

Additional context

Add any other context or screenshots about the support request here.

khalwat commented 1 year ago

SEOmatic won't introduct multiple <title> tags. Probably somewhere in your templates, you have a manual title tag inserted.

We'd recommend that you get rid of the manual <title> tag, and instead let SEOmatic handle it... although you can disable SEOmatic's rendering of the <title> tag too, but it's better to let SEOmatic handle it.

Also this is the Webperf issues area -- probably this issue should be on SEOmatic's issues? https://github.com/nystudio107/craft-seomatic/issues

keithmarszalek commented 1 year ago

Thank you. This issue has less to do with SEOMatic's value and more to do with the confines of our site. Can you please share how to disable the title field? I've removed the code from both the Global and individual page Content fields, but the tag remains.

khalwat commented 1 year ago

Sure, you can do what is described here: https://nystudio107.com/docs/seomatic/using.html#meta-object-properties

{% do seomatic.title.get("title").include(false) %}

or

{% do seomatic.title.container().include(false) %}

...in your base layout template that other pages extend, so that it will not include that tag on any pages.

But again, if possible, it'd probably be better to remove whatever title you're already generating, and let SEOmatic handle it, so content authors, etc. can have some control over it.