From 9e9093ab6d0957a7bebba78df528639da5210574 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 2 Oct 2013 21:05:08 +0000 Subject: [PATCH] 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 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 409044372c..5ba2172d6b 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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 ); /**