WordPress.org

Ready to get started?Download WordPress

Forums

Next Page and Pagination Not Redirecting Properly (3 posts)

  1. docarzt
    Member
    Posted 3 years ago #

    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?

  2. docarzt
    Member
    Posted 3 years ago #

  3. heygaryc
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic