Always show search-results or search-no-results for searches, even archive searches. Props johnbillion. fixes #20435

git-svn-id: https://develop.svn.wordpress.org/trunk@20595 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-04-25 20:38:40 +00:00
parent 91edc71696
commit 577286e19d
1 changed files with 3 additions and 6 deletions

View File

@ -411,8 +411,10 @@ function get_body_class( $class = '' ) {
$classes[] = 'archive';
if ( is_date() )
$classes[] = 'date';
if ( is_search() )
if ( is_search() ) {
$classes[] = 'search';
$classes[] = $wp_query->posts ? 'search-results' : 'search-no-results';
}
if ( is_paged() )
$classes[] = 'paged';
if ( is_attachment() )
@ -491,11 +493,6 @@ function get_body_class( $class = '' ) {
} else {
$classes[] = 'page-template-default';
}
} elseif ( is_search() ) {
if ( !empty( $wp_query->posts ) )
$classes[] = 'search-results';
else
$classes[] = 'search-no-results';
}
if ( is_user_logged_in() )