Don't order feeds of search results by relevance.
Allow for orderby=relevance to explicitly request relevance. fixes #7394. Built from https://develop.svn.wordpress.org/trunk@25668 git-svn-id: http://core.svn.wordpress.org/trunk@25584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ea352cde7c
commit
9e9093ab6d
|
@ -2627,7 +2627,7 @@ class WP_Query {
|
|||
// Order search results by relevance only when another "orderby" is not specified in the query.
|
||||
if ( ! empty( $q['s'] ) ) {
|
||||
$search_orderby = '';
|
||||
if ( ! empty( $q['search_orderby_title'] ) && empty( $q['orderby'] ) )
|
||||
if ( ! empty( $q['search_orderby_title'] ) && ( empty( $q['orderby'] ) && ! $this->is_feed ) || 'relevance' === $q['orderby'] )
|
||||
$search_orderby = $this->parse_search_order( $q );
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue