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
title
property is missing from WP_Query class documentation
#1371
Labels
code reference
Issues for Code Reference portal of DevHub
developer documentation (DevHub)
Improvements or additions to developer documentation
self-assigned
[Status] Done
Issue is completed
Comments
Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels. |
github-actions
bot
added
[Status] In progress
Issue is in progress
and removed
[Status] To do
Issue marked as Todo
labels
Dec 21, 2023
stevenlinx
added
code reference
Issues for Code Reference portal of DevHub
[Status] To do
Issue marked as Todo
and removed
[Status] In progress
Issue is in progress
labels
Dec 21, 2023
github-actions
bot
added
the
developer documentation (DevHub)
Improvements or additions to developer documentation
label
Dec 21, 2023
Heads up @stevenlinx - the "code reference" label was applied to this issue. |
/assign |
github-actions
bot
added
[Status] In progress
Issue is in progress
and removed
[Status] To do
Issue marked as Todo
labels
May 7, 2024
I've made the revisions. |
stevenlinx
added
[Status] Review
Issue in review
and removed
[Status] In progress
Issue is in progress
labels
May 7, 2024
Heads up @docs-reviewers - the "[Status] Review" label was applied to this issue. |
github-actions
bot
added
[Status] Done
Issue is completed
and removed
[Status] Review
Issue in review
labels
May 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
code reference
Issues for Code Reference portal of DevHub
developer documentation (DevHub)
Improvements or additions to developer documentation
self-assigned
[Status] Done
Issue is completed
Issue Description
The documentation for the
WP_Query
class is missing thetitle
parameter.URL of the Page with the Issue
https://developer.wordpress.org/reference/classes/wp_query/
Section of Page with the issue
I think this would best fit under the "Post & Page Parameters" section.
Why is this a problem?
WordPress 4.4 added the parameter to
WP_Query
to retrieve posts by their title (post_title
), however it is not currently in the documentation for the class. It's especially note-worthy that the parameter istitle
and notpost_title
, and also that it must be an exact match (the generated SQL clause uses equals, for example:'post_title' = 'Hello World!'
)Code where this parameter is applied: https://github.com/WordPress/wordpress-develop/blob/6.4/src/wp-includes/class-wp-query.php#L2134
Suggested Fix
In the "Post & Page Parameters" section, at the end of the
ul
we can add:Then we can add an example, within the same section:
The text was updated successfully, but these errors were encountered: