Prevent 'Page %s' from being added to page title on 404 error pages in bundled themes.

props psoluch, rob1n.
fixes #16468.

git-svn-id: https://develop.svn.wordpress.org/trunk@28250 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-05-04 13:16:30 +00:00
parent ece95a0257
commit 0a16bda6e3
5 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
?></title>

View File

@ -484,7 +484,7 @@ function twentyfourteen_wp_title( $title, $sep ) {
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
}

View File

@ -29,7 +29,7 @@
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
?></title>

View File

@ -214,7 +214,7 @@ function twentythirteen_wp_title( $title, $sep ) {
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
return $title;

View File

@ -209,7 +209,7 @@ function twentytwelve_wp_title( $title, $sep ) {
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
return $title;