diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 6081ead91e..6d46dce460 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -385,6 +385,7 @@ function wp_title($sep = '»', $display = true, $seplocation = '') { $year = get_query_var('year'); $monthnum = get_query_var('monthnum'); $day = get_query_var('day'); + $search = get_query_var('s'); $title = ''; $t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary @@ -456,6 +457,11 @@ function wp_title($sep = '»', $display = true, $seplocation = '') { $term = $term->name; $title = "$tax$t_sep$term"; } + + //If it's a search + if ( is_search() ) { + $title = sprintf(__('Search Results %s %s'), $t_sep, strip_tags($search)); + } if ( is_404() ) { $title = __('Page not found');