WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] previous_post_link() and next_post_link() only for siblings on pages (2 posts)

  1. Hi!

    Is there a way to use previous_post_link() and next_post_link() only for page siblings (and not "posts")? I have a strict page hierarchy (3 levels of descendants) and I want to include previous_post_link() and next_post_link() in my page template without the links going to "uncles" for example. My understanding of previous_post_link() and next_post_link() is that they go to the previous and next created pages, chronologically. That doesn't work for me because I'm creating my pages at different times. Any way to keep the links to their siblings?

  2. Nevermind:

    http://wordpress.org/extend/plugins/next-page-not-next-post/

    just make sure to include the echo in the php command as per the plugin website: http://binarym.com/2009/next-page-not-next-post/

    works great on WP 3.0.1!

Topic Closed

This topic has been closed to new replies.

About this Topic