WordPress.org

Support

Support » How-To and Troubleshooting » Next Page and Pagination Not Redirecting Properly

Next Page and Pagination Not Redirecting Properly

  • On my multi-part articles, the next page/prev page and page number links all redirect to the first page of the article in MOST cases. In others it is working fine. Any idea on where I might begin to trouble-shoot this? Are there common errors that might be affecting?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Example:

    The Top 10 TV Characters of the Decade

    Works, but:

    My 20 Favorite Supernatural Episodes

    Doesn’t work. Can anyone help?

    heygaryc
    Member

    @heygaryc

    This is a known bug with WordPress 3.0, and there is a bug fix logged in the Trac database, found here:
    http://core.trac.wordpress.org/ticket/13471

    As a temporary and immediate fix on my site, we made a very small change to the post-template.php file in the wp-includes directory.

    You need to replace line 622, which currently looks like this:
    $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">';

    With:
    $output .= '</a><a href="' . trailingslashit(get_permalink()) . user_trailingslashit('?page=' . $i, 'single_paged') . '">';

    THEN, also replace line 636 in exactly the same way, replacing:
    $output .= '</a><a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">';

    With:
    $output .= '</a><a href="' . trailingslashit(get_permalink()) . user_trailingslashit('?page=' . $i, 'single_paged') . '">';

    It should work fine after this fix.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Next Page and Pagination Not Redirecting Properly’ is closed to new replies.