From 0b08cd7a252e1dcfed5d79d5ae1a3b4995ed7573 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 4 May 2014 13:17:15 +0000 Subject: [PATCH] Prevent 'paged-*' from being added to body classes on 404 error pages. props psoluch. see #16468. Built from https://develop.svn.wordpress.org/trunk@28249 git-svn-id: http://core.svn.wordpress.org/trunk@28077 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index be462587a2..d2c5411821 100644 --- a/wp-includes/post-template.php +++ b/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() )