• Before anyone flames me, I’m not talking about traditional pagination, or listing posts, or anything like that. I am talking about being able to generate links of PAGES (not posts) in sequential order, determined by their Page Order.

    I see there are functions to navigate between posts in chronological order, but I couldn’t find anything that does what I’m looking for.

    Any ideas?

Viewing 7 replies - 16 through 22 (of 22 total)
  • Sorry moshu, haste always makes wastes.

    Kafkaesqui, thanks for making this nice plugin for pages. Is there anyway to modify it so one can navigate between brother/sister pages only, specifically excluding their parent and grandparent pages?

    Hi guys, I just modified this plugin so that you can limit it within a specific parent page’s children only.

    All you need to do is pass the current page’s parent ID into the function as explained below. This will limit the next and previous links to ONLY the brothers and sisters of that current page.

    View Source | Download as Plugin

    The usage is the same as before. Check This post for details. The only difference is an extra parent_id parameter, used as follows:

    <?php next_page('orderby', 'link', 'before', 'after', 'title_attr', $post->post_parent); ?>

    <?php previous_page('orderby', 'link', 'before', 'after', 'title_attr', $post->post_parent); ?>

    I hope this helps the people who were asking for this.

    Andy.

    You should make that file a phps or txt – otherwise we cannot see it 🙂

    Sorry, I was having problems with this. It’s done now, although not in color 😐

    apeatling

    I’ve tried to install your revised plugin, but when i try to activate it i get the following error message:

    Parse error: syntax error, unexpected '"', expecting ',' or ';' in ... plugins/next_prev_page.php on line 42

    Line 42 is: echo $before.'<a>ID).'"';

    BUT in the source code you posted above ,
    the same line is: echo $before.'ID).'"';

    I tried simply changing the line in the plugin to the one from the source code but that returned the same error maessage.

    Any ideas?

    kk

    Try downloading again. It seems as though I missed a quote when moving the code into a plugin.

    Thnx, I’ll try that

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Next page (literally)’ is closed to new replies.