• Resolved Roger H

    (@rwheindl)


    I have a bunch of posts to display with pagination. I tested a setup with 3 pages.

    I’m using:
    posts_nav_link(' | ', '« Previous', 'Next »');

    Page 1 and 3 properly display just Previous or Next, but page 2 does not show a separator:
    « PreviousNext »

    I also tried:
    posts_nav_link();

    And the default separater is also not showing:
    « Previous PageNext Page »

    Is this a bug in the latest version of WordPress?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Roger H

    (@rwheindl)

    Note, I disabled all plugins with same result. I’m customizing the starker’s template.

    Here’s the pastebin.

    Thread Starter Roger H

    (@rwheindl)

    After some debugging, I’ve narrowed it down to something is wrong with the regular expression that processes the separator in the “wp-includes/link-template.php” file of WordPress, line 1716:

    $return .= preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $args['sep']);

    But in trying to figure out what the developer(s) originally intended, I’m at a loss.

    The first thing I notice is & should probably be & as every place I look around the internet doesn’t show it with a zero. And, what’s the $1 for?

    Next, why’s there a carat(^) in the character class after the initial ampersand? I’ve not seen anything in HTML with &^555; before.

    Can anyone with regex experience provide some insight?

    Thread Starter Roger H

    (@rwheindl)

    Okay, since the HTML is messing up the presentation of my notes, I’m adding some spaces:

    & # 0 3 8 ; should probably be & # 3 8 ;

    Thread Starter Roger H

    (@rwheindl)

    Got it, I was missing 'paged'=>$paged in my arguments for query_posts();

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘posts_nav_link separater malfunction 3.2.1’ is closed to new replies.