Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Largo declares support for title-tag but doesn't implement it #1470

Closed
benlk opened this issue Sep 7, 2017 · 4 comments · Fixed by #1566
Closed

Largo declares support for title-tag but doesn't implement it #1470

benlk opened this issue Sep 7, 2017 · 4 comments · Fixed by #1566
Assignees
Labels
priority: normal Must be completed before release of this version of plugin. status: needs review type: bug

Comments

@benlk
Copy link
Collaborator

benlk commented Sep 7, 2017

https://github.com/INN/largo/blob/v0.5.5.3/functions.php#L424

in the function largo_setup, we declare theme support for 'title-tag'. 'title-tag' means that the theme doesn't have any <title> tags in it, and the ones that are there are wrapped as backwards-compatibility functions for WordPress versions before 4.1. See the Codex article for what the backwards compatibility function looks like.

The reason this is a problem is because we have both add_theme_support( 'title-tag' ); and <title tags in the header.php file. We should have either one or the other.

https://github.com/INN/largo/blob/v0.5.5.3/header.php#L24-L25

The theme-output title tag pairs with the WordPress-output title tag to result in all Largo sites outputting two different title tags.

Most people notice this when they activate an SEO plugin like Yoast, which, seeing the title-tag support, modifies the WordPress-output title tag, but because that comes after the Largo-output title tag, it doesn't affect the actual parsed title rendered by browsers or search engines.

There's two possible fixes:

Until a fix for this ships in Largo, we can patch child themes by copying Largo's header.php and removing the relevant lines.

@benlk benlk added priority: normal Must be completed before release of this version of plugin. status: needs review type: bug labels Sep 7, 2017
@benlk benlk self-assigned this Sep 7, 2017
@benlk
Copy link
Collaborator Author

benlk commented Sep 10, 2017

For sites using Largo, the fix for this is copying Largo's header.php into your child theme and removing the <title> ... </title> section: https://github.com/INN/umbrella-rivard-report/pull/14/files

@benlk
Copy link
Collaborator Author

benlk commented Sep 10, 2018

This is also part of the "wp_title" thing mentioned in #844 and #1245

@benlk
Copy link
Collaborator Author

benlk commented Nov 6, 2018

  • replace the contents of Largo's title tag with a call to wp_title()
  • filter wp_title to output the contents of Largo's title tag

@benlk
Copy link
Collaborator Author

benlk commented Nov 9, 2018

Whoops, gotta not-enqueue the meta stuff if Yoast is installed and active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal Must be completed before release of this version of plugin. status: needs review type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant