[wp-trac] [WordPress Trac] #35365: Pagination is empty since wp 4.4.1
WordPress Trac
noreply at wordpress.org
Fri Jan 8 23:07:01 UTC 2016
#35365: Pagination is empty since wp 4.4.1
--------------------------+------------------------
Reporter: BackuPs | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Permalinks | Version: 4.4.1
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
--------------------------+------------------------
Comment (by francisperron):
Replying to [comment:5 BackuPs]:
> Hi
>
> Thank you for fixing this. I can confirm changing the wp-
includes/canonical.php lines 264-270 from this
>
> {{{#!php
> <?php
> // Post Paging
> if ( is_singular() && ! is_front_page() &&
get_query_var('page') ) {
> if ( !$redirect_url )
> $redirect_url = get_permalink(
get_queried_object_id() );
> $redirect_url = trailingslashit( $redirect_url ) .
user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
> $redirect['query'] = remove_query_arg( 'page',
$redirect['query'] );
> }
> }}}
>
>
> to
>
> {{{#!php
> <?php
> // Post Paging
> if ( is_singular() && get_query_var('page') && (
!is_front_page() || ( isset($wp_query->queried_object) && 'page' ==
get_option('show_on_front') && $wp_query->queried_object->ID ==
get_option('page_on_front') ) ) ) {
> if ( !$redirect_url )
> $redirect_url =
get_permalink( get_queried_object_id() );
> $page = get_query_var( 'page' );
> if ( is_front_page() ) {
> $redirect_url =
trailingslashit( $redirect_url ) . user_trailingslashit(
"$wp_rewrite->pagination_base/$page", 'paged' );
> } else {
> $redirect_url =
trailingslashit( $redirect_url ) . user_trailingslashit( $page,
'single_paged' );
> }
> $redirect['query'] = remove_query_arg(
'page', $redirect['query'] );
> }
> }}}
>
> fixes the issue.
>
> I guess this will be part of the next update?
>
>
Thank you so much, it work! It must be in the next WP update!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35365#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list