Documentation-Issue-Tracker icon indicating copy to clipboard operation
Documentation-Issue-Tracker copied to clipboard

Documentation for `wp_title()` is busted

Open crstauf opened this issue 2 years ago • 6 comments

Issue Description

The documentation for the wp_title() function is essentially empty.

URL of the Page with the Issue

https://developer.wordpress.org/reference/functions/wp_title/

Section of Page with the issue

All sections.

Why is this a problem?

Unhelpful.

Suggested Fix

Populate missing sections.

crstauf avatar Feb 14 '24 04:02 crstauf

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

github-actions[bot] avatar Feb 14 '24 04:02 github-actions[bot]

/assign to me please

speedyprem avatar Feb 27 '24 14:02 speedyprem

Hey @speedyprem, thanks for your interest in this issue! 🍪🍪🍪
If you have any questions, do not hesitate to ask them in our #docs Slack channel.
Enjoy and happy contributing ❤️

github-actions[bot] avatar Feb 27 '24 14:02 github-actions[bot]

The wp_title() function is primarily used to get the title tag within the HTML

section of a WordPress-powered website. This function dynamically generates the title based on various factors such as the page being viewed, the site name, and the configured settings.

Here's a basic example of how wp_title() might be used within a WordPress theme:

<head>
    <title><?php wp_title('|', true, 'right'); ?></title>
    <!-- Other meta tags, stylesheets, and scripts -->
</head>

In the above example, wp_title() is used to generate the content within the

tag. The function accepts parameters to specify the separator character ('|' in this case), whether to display the site name (true), and the position of the site name relative to the page title ('right').

speedyprem avatar Feb 27 '24 14:02 speedyprem

This issue is ready for review.

/review

speedyprem avatar Feb 27 '24 14:02 speedyprem

Similar ticket https://github.com/WordPress/Documentation-Issue-Tracker/issues/1624

benazeer-ben avatar Feb 10 '25 07:02 benazeer-ben