-
Notifications
You must be signed in to change notification settings - Fork 43
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
wp_title() doc appears broken #1624
Comments
Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels. |
/assign |
Hey @benazeer-ben, thanks for your interest in this issue! 🍪🍪🍪 |
Hi Team, Here is the updated documentation for wp_title() wp_title()Displays or retrieves the page title for all areas of a blog. 🔔 Deprecated: This function is deprecated as of WordPress 4.4. Instead, use add_theme_support( 'title-tag' ). DescriptionThe wp_title() function generates the title of a page or post for display in the browser tab or SEO purposes. By default, the separator ($sep) is placed before the page title, meaning the blog title appears first. This can be changed using $seplocation to place the separator after the page title. 🚨 Important: Since WordPress 4.4, themes should use add_theme_support( 'title-tag' ) to allow WordPress to handle titles automatically. Parameters$sep $display $seplocation Return(string|void) Returns the title if $display is false, otherwise prints it directly. UsageInstead of wp_title(), use:
This ensures WordPress dynamically manages the title. Deprecated Approach (wp_title())
Source code
Changelog Deprecated in: 4.4 Related add_theme_support( 'title-tag' ) |
Heads up @docs-reviewers - the "[Status] Review" label was applied to this issue. |
Issue Description
This documentation appears broken. There should be at least some $args description, source code...
URL of the Page with the Issue
https://developer.wordpress.org/reference/functions/wp_title/
Why is this a problem?
It is unclear what that function even is, when there is no context.
Suggested Fix
There also should be a bold notice stating that this function is not suggested anymore and instead, add_theme_support should be used.
The text was updated successfully, but these errors were encountered: