-
Notifications
You must be signed in to change notification settings - Fork 882
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
Missing document_title_separator filter? #6400
Labels
Comments
Thanks for your reply and feature request Unfortunately we're not able to implement this at short notice. Currently we're focusing on issues that affect many users. We've concluded that this feature won't be used by many users, therefore we are not able to fix this short-term. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While working on a client site, I needed to implement a custom title tag for a page that has content that comes from an API (i.e. not a single post, archive, author, etc). Part of this implementation was creating the <title> tag for the header. Because of this, we implemented filters for the various WPSEO functions (meta, title tag, etc). While working on the
wpseo_title
filter and reading through core, I see it's not using thedocument_title_separator
filter that core uses in_wp_render_title_tag()
. Core uses this to render a title if you havetitle-tag
enabled for theme, and it callswp_get_document_title()
to generate the title.WPSEO is using the
pre_get_document_title
filter to generate the document title, but if it's not being used, further down in the core code is this:Since WPSEO doesn't tap into the
document_title_separator
hook, it looks like the only way to get the configured title separator is to call the utils method directly, so I ended up implementing this:Not sure if this was by design or an oversight, and I know this is likely an edge-case, but it might be good to have a
document_title_separator
in WPSEO that returns theWPSEO_Utils::get_title_separator()
instead of need to call it directly.Technical info
The text was updated successfully, but these errors were encountered: