Plugin Directory

Linchpin - PrevNextPage

Create sibling page links. Similar to next_post_link() & previous_post_link() but for pages. Great for utilizing WordPress for Presentations

Create next/previous links for pages. Adds the functions next_page_link() and previous_page_link() which links sibling to page(s). If your page doesn't have a direct sibling the plugin will try to go out to the parent of the current page and get the parent's next sibling. If enabled the plugin will also loop from end->beginning and beginning->end.

This plugin is great for utilizing WordPress for presentations. If you create a set of pages. This plugin will cycle through them. Additionally you could utilize some javascript to create a timer to automatically go from page to page.

This plugin is based on 'Next and Previous Page not Post' by Matt McInvale. Although it's gone through almost a complete rewrite from his release in 09. This plugin is a bit more optimized to take advantage of newer plugin techniques. Includes code from banesto as well regarding references to grandparent pages. Also added in additional features such as $args array for easier customization down the road. This plugin is great for utilizing wordpress as a presentation tool.

Function Options

next_page_link( $args:array );
previous_page_link( $args:array );
  • 'label' => '', // What ever you want your link to be labeled. If no label is given the url is utilized
  • 'loop' => NULL, // 'expand', 'loop'
  • 'getPagesQuery' => 'sort_column=menu_order&sort_order=asc',
  • 'link_class' => '', // class given to the anchor for styling or js library
  • 'link_id' => '', // id given to the anchor for styling or js reference
  • 'echo' => 'true', //
  • 'direction' => '', // 'next', 'prev'

Function Examples

  • <?php previous_page_link( array ( 'label' => 'View My Previous Page', 'loop' => 'loop', 'link_class' => 'ui-button-disabled' ) ); ?>
  • <?php next_page_link( array ( 'label' => 'Next Page' ) ); ?>

Shortcode Options

  • 'label' = '',
  • 'loop' = '', // 'expand', 'loop'
  • 'getPagesQuery' = 'sort_column=menu_order&sort_order=asc',
  • 'link_class' = '',
  • 'link_id' = '',
  • 'direction' = '', // 'next', 'prev'

Shortcode Examples

  • [previous_page_link]
  • [next_page_link label="View My Next Page"]

Requires: 3.0 or higher
Compatible up to: 3.3.2
Last Updated: 2011-12-22
Downloads: 751

Average Rating

5 stars
(2 ratings)

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,2,2 100,1,1
100,1,1