Do proper canonical redirect for ?paged=1 or /page/1/. fixes #11696
git-svn-id: http://svn.automattic.com/wordpress/trunk@12691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9ad08bb69f
commit
145db4bad0
|
@ -162,7 +162,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||||
if ( $paged > 1 && !is_single() ) {
|
if ( $paged > 1 && !is_single() ) {
|
||||||
$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit("page/$paged", 'paged');
|
$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit("page/$paged", 'paged');
|
||||||
} elseif ( !is_single() ) {
|
} elseif ( !is_single() ) {
|
||||||
$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit($paged_redirect['path'], 'paged');
|
$addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
|
||||||
}
|
}
|
||||||
} elseif ( $paged > 1 ) {
|
} elseif ( $paged > 1 ) {
|
||||||
$redirect['query'] = add_query_arg( 'paged', $paged, $redirect['query'] );
|
$redirect['query'] = add_query_arg( 'paged', $paged, $redirect['query'] );
|
||||||
|
|
Loading…
Reference in New Issue