Custom Pagination Plugin for WordPress

Monday, August 24th, 2009

Download: Custom Pagination Plugin, Version 1.0

With the Custom Pagination plugin, a user may customize the look of a post’s next and previous links using the HTML editor. It was built by WebIT.ca and funded by DateDaily.com: an online dating and relationship blog.

Instructions

The link is created by selecting the text label within a post’s body and clicking the link icon.

Selecting text for a link to the next page

Selecting text for a link to the next page

In the Link URL field, the following values will produce a link to another page:

  • page:next links to the next page
  • page:prev or page:previous links to the previous page
  • page:first links to the first page of the post
  • page:last links to the last page of a post
  • page:n links to the nth page of a post (e.g. page:2 for the second page)
Adding the next page link text

Adding the next page link text

If the link is directing to a page that does not exist — for instance page:next on the last page –, the link and the link text do not appear.

The generated link

The generated link

All links processed by Custom Pagination will have the added class name ‘page’. If you wish to style such links, in your CSS, add the line:

a.page { /* page style goes here */ }

Installation

  1. Uncompress the .zip file and copy or upload the custompagination directory into your /wp-content/plugins/ directory
  2. If you are working with a recent version of WordPress, you can upload the downloaded ZIP file directly into the Plugins in the Add New section
  3. Activate the plugin through the Plugins menu in WordPress

Done.

Actually, if you wish to use WordPress pagination when there is no Custom Pagination on a page, you may use the following PHP code:

// inside single.php
// displays the standard pagination when no custom pagination link is found
if ( ! cp_link_found() )
	wp_link_pages( array( 'next_or_number' => 'next', 'nextpagelink' => 'Next page »', 'previouspagelink' => '« Previous page' ) );

Frequently Asked Questions

Will the pagination work with custom permalinks?

It should.

What is the cost of the plugin?

This plugin is provided free of charge thanks to the good people at Mate1 Inc and the site DateDaily.com. You may use the Custom Pagination plugin for any purpose provided you keep the comment section of the custompagination.php file.

2 Responses to “Custom Pagination Plugin for WordPress”

  1. Joe says:

    Nice plugin. Much easier than fixing the template. Very useful :)

  2. Thank you! I’ve been beating my head against the wall trying to figure this out on my own. I knew there had to be a plugin for it, but I didn’t know it was called “pagination.” Cheers!

Leave a Reply