Support » Plugin: Page-Links Plus » Broken link

  • Resolved gulliver


    To provide more prominent previous/next links, I use wp_link_pages twice – once to show just the previous/next links right after the preceding paragraph, and again at the foot of the post to show the pages numbers.

    When viewing as a single page, a ‘previous’ link is still shown. Presumably this can be removed with some conditional statement, but I’ve no idea how.

    More importantly, it tries to link to a non-existent -1 page.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Studio Hyperset


    Hi, Gulliver:

    Are you using any of the Page-Links Plus modules or are you only using the free, “single page” plugin? If you haven’t purchased anything, and are only using what’s available from the WP plugin directory, it’s the former.

    Let me know, and we’ll start drilling down on this.


    It’s the freebie.

    Plugin Author Studio Hyperset


    Hi, Gulliver:

    I’ve just now retested the stand-alone “single page” plugin on three of my sites — including a clean, default WP install with the 2012 theme — and I can’t recreate the problem you describe.

    Would it be possible for you to share some screenshots with me? I suspect we’re dealing with a theme issue and/or a plugin conflict.

    If you can, it’d also be quite helpful if I could see your theme’s wp_link_pages function. This usually appears at the bottom of your page.php/single.php template or in your footer.php file. We might be able to fix this issue by removing or adjusting some of the native parameters.


    It’s clearly my theme that’s the problem – I just swapped to 2011 and things are fine.

    The requested code is below:

    <?php wp_link_pages( array(
    'before' => '<p class="continue-reading">',
    'after' => '</p>',
    'next_or_number' => 'next',
    'previouspagelink' => '« PREVIOUS  ',
    'nextpagelink' => 'NEXT »'
    )); ?>

    I also use it again, modified, toward the foot of the post:

    <?php wp_link_pages('before=<p id="paginate-page-lower">Page: &after=</p>&next_or_number=number&pagelink= %'); ?>

    Plugin Author Studio Hyperset


    That’s good news re: the plugin.

    I don’t see anything abnormal in this wp_link_pages code, or anything that would conflict with Page-Links Plus. I wonder if the dual instance isn’t “confusing” WordPress, that is, interrupting the function’s pagination calculation.

    Perhaps try removing the second instance? See if that fixes the issue.

    If not, it might be worth an email to the theme developer.

    I’m marking this “resolved” since we’ve established the problem isn’t Page-Links Plus related.

    After a further check with 2012, adding that array code above to the 2012 template recreates the issue.

    Plugin Author Studio Hyperset


    Ah, ok.

    This is good to know, I suppose: one can’t use multiple instances of wp_link_pages without really confusing the framework. It never occurred to me to try this, but I can see why, in certain instances, one might want more than one page list on pages/posts.

    It might be worth opening a development ticket in the WP trac:


    I’ve now had more time to look at this, and…

    It’s not multiple instances of wp_link_pages that’s the issue, but that array.

    Using it alone works fine in providing ‘previous’ and ‘next’ ‘links.

    And it’s also fine when using it with an additional and different version (to provide ‘Page 1 2 3’ links) elsewhere in the template.

    But with the plugin active, and viewing a post as a single page the ‘previous’ link in that array is to /postname/-1/.

    I’m not very-tech, and hence don’t know enough to suggest more.

    Plugin Author Studio Hyperset


    I’ll look in to this and see if I can’t recreate it and, if necessary, adjust the plugin to accommodate this specific usage.

    Thanks so much for articulating the issue.

    Thanks, I’m happy to help – and always grateful to people like you who’re making stuff which improves things.

    Plugin Author Studio Hyperset


    Very kind, Gulliver.

    WordPress represents a significant contribution to humanity — to human literacy more specifically — and developing useful add-ons is a privilege.

    Take care.

    Thanks – that’s an excellent way of considering it, and one which is genuinely causing me to re-evaluate some of the what/how/why in my own stuff.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Broken link’ is closed to new replies.