Opened 8 years ago
Closed 8 years ago
#39336 closed defect (bug) (fixed)
Document WP_Query orderby=relevance
Reported by: | jnylen0 | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | minor | Version: | 3.7 |
Component: | Query | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
I expected relevance
to show up here - https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
There may be other parameters/values that are also missing from the WP_Query
documentation.
Attachments (4)
Change History (10)
#1
@
8 years ago
- Component changed from General to Query
- Keywords needs-docs added
- Milestone changed from Awaiting Review to 4.8
- Severity changed from normal to minor
- Type changed from enhancement to defect (bug)
- Version set to 3.7
#3
@
8 years ago
- Keywords has-patch added; needs-patch removed
Please ignore 39336.2 patch and consider the 39336.3
#4
@
8 years ago
- Keywords needs-docs removed
Thanks for the patch, @dots.
$relevance
should not have its own top-level @param
entry, as it's only a possible value for 'orderby'. Your patch also added an entry for $type
, but as far as I can see, this is not a valid orderby parameter for WP_Query
. Can you have a look at 39336.4.patch and see if it matches with your understanding?
Note: See
TracTickets for help on using
tickets.
Also need to note that the default
orderby
changes fromdate
torelevance
when a search parameter is passed toWP_Query
.