WordPress / Documentation-Issue-Tracker

Issue Tracker for the WordPress Documentation team.
https://make.wordpress.org/docs/
Other
84 stars 41 forks source link

Parameter `search_columns` for `WP_Query` is not documented #1384

Open crstauf opened 12 months ago

crstauf commented 12 months ago

Issue Description

In WordPress 6.2, the parameter search_columns was added to WP_Query, which allows the query to specify the columns to search. This parameter is not mentioned in documentation, but it should be.

URL of the Page with the Issue

https://developer.wordpress.org/reference/classes/wp_query/#search-parameters

Section of Page with the issue

Parameters > Search Parameters

Why is this a problem?

Documentation should be thorough and helpful: wanting to specify columns to search is a common request.

Ex: https://wordpress.stackexchange.com/questions/417138/how-to-use-wp-query-to-search-for-posts-where-post-content-or-post-title-or-post/417139

Suggested Fix

Add documentation for the search_columns parameter to the Search Parameters section of WP_Query class.

github-actions[bot] commented 12 months ago

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

crstauf commented 11 months ago

Hmm; search_terms/sentence should also probably be added to documentation.