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

add_filter('wp_title') not working #11

Open
lpheller opened this issue Jul 20, 2020 · 0 comments
Open

add_filter('wp_title') not working #11

lpheller opened this issue Jul 20, 2020 · 0 comments

Comments

@lpheller
Copy link

Setting up a page title for a custom route the way your documentation describes it (Setting the page title for custom routes) doesn't seem to be working anymore. At least for me it doesn't. And seeing that the
wp_title function got deprecated (Link), i guess this is the new appropriate way to solve this:

add_filter('document_title_parts', function (array $title_parts) {
    $title_parts['title'] = "Page Title";
    return $title_parts;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant