From ece95a0257e7bb3cfb719744bf654da3b516eafa Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 4 May 2014 13:16:13 +0000 Subject: [PATCH] Prevent 'paged-*' from being added to body classes on 404 error pages. props psoluch. see #16468. git-svn-id: https://develop.svn.wordpress.org/trunk@28249 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index be462587a2..d2c5411821 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -612,10 +612,10 @@ function get_body_class( $class = '' ) { $page = $wp_query->get( 'page' ); - if ( !$page || $page < 2) + if ( ! $page || $page < 2 ) $page = $wp_query->get( 'paged' ); - if ( $page && $page > 1 ) { + if ( $page && $page > 1 && ! is_404() ) { $classes[] = 'paged-' . $page; if ( is_single() )