Support » Plugins » Pagination on PAGES (not posts)

  • Hi. I have a documentation website that we are treating like a book (Chapters and pages within those chapters). So we are using pages instead of posts, so that we can take advantage of the hierarchy structure of pages, rather than a chronological structure that posts have.

    We create a page that acts as a “chapter”, and then we create subpages within those “chapters”. Some subpages have their own subpages (so there are grandchildren as well). Any page that has children displays a list of those children (and grandchildren) — but not siblings pages or higher-level pages.

    Right now, the only way to go from a (sub)page to the next (sub)page is to climb back up to the parent, and select it from there. This is fine, but we’d like to include an easier way to go from page to page (siblings). What we are hoping to get is pagination (like posts have) that allow you to go to next and previous (sibling) pages. This will allow the site to behave more like a book.

    We don’t want to list out all the pages to the site because it clutters up the layout (there are a TON of pages), and even just showing direct siblings (from the parent’s children) is still a lot of clutter.

    Part of me is thinking maybe it would have been better to have gone to posts, but then that wouldn’t have the hierarchy structure we want. Plus at this point, we’ve gone too far to go back now. 🙂

    So my question is, how do I do this? Will it require a plugin? If so, does one exist? I have no PHP skills, so I rely heavily on what I can find online. Unfortunately, this is one thing I’ve not been able to find.

    Any help would be sooooo appreciated! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • I suspect you are looking for something along these lines?

    That’s the list of pages. I need next/previous links. 🙂

    I’m guessing this is not possible? Every response I’m getting on Twitter (I asked there as well) seems to point to no.

    I looked for a plugin and didn’t see much either. Of course you could always put a link to a previous and next page in each of your pages, or, as mrlarter suggested, use wp_list_pages to display all the pages that are children of your parent page.

    this plugin might be able to do what you’re looking for. But it requires all your “subpages” to be placed within a single Page (instead of within separate Pages like you have now), and then you split them with the <–nextpage–> Quicktag.

    I’m trying to do a similar thing (I think). Basically, what I want to do is create a next_post_link, but for WP Pages. Let’s say this is my page hierarchy:

    Page A
    Page B
    Page C

    While I’m viewing Page A, I want to display a link and a preview image of Page B. While viewing Page B, I want to view the same for Page C, and so on down the line.

    Here’s my code so far:

    global $post;
    $currentpage = get_the_ID();
    $parent = $post->post_parent;
    'post_type'=>'page',						'post__not_in'=>array($currentpage),				'post_parent' => $parent,
    'orderby' => 'title',
    'order' => 'ASC',
    'showposts' => 1,
    $siblings = new WP_Query($args);
    <div class="next-page">
    <?php while ($siblings->have_posts()) : $siblings->the_post(); ?>
    <!--do some stuff-->
    <?php endwhile ;?>

    What I’m missing is some sort of offset, or “start” parameter, so that it only return the immediate sibling of the current page.

    I appreciate any help. Thanks.

    By the way, I have been trying to post this as a new topic for weeks, but it looks like the forum is not letting me post a new topic. When I log out, the the thread is no longer visible, and I can’t add it to my favorites RSS feed. Does this happen to anyone else? Do I need special powers to be able to create a new thread?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Pagination on PAGES (not posts)’ is closed to new replies.