Pagination with Custom Taxonomy – No More 404s

Have you ever wanted to have a Custom Taxonomy page with a number of posts_per_page less than the setting in Settings->Reading?  If so, I’ll bet you got ‘404 – Not Found’ errors when trying to link to some pages.

This is a known common problem with pagination for Custom Taxonomies.  Here is one solution. Continue reading

‘Roll Your Own’ Pagination

In order to provide pagination when query_posts() was used in a non-WP site, the technique shown here was used.

Standard pagination did not work because the ‘paged’ query variable was not set. Instead the ‘pg’ variable was used and added to the links created by previous/next_posts_link(). Continue reading

Pagination Using paginate_links()

There are often posts on the WP Support forum asking how to paginate a custom query or an array. Here is a link to an article with one solution: Pagination Without Using A Plugin

The code below shows an example of using the built-in WP function paginate_links() for this purpose. Continue reading

Pagination of Array / Custom Query


As of WP 3.3.1, I have had problems using this approach with pretty permalinks. Please use the paginate_links() technique instead.

The mam_paginate() function shown here can be used to paginate a Custom Query or any array. I use it instead of paginate_links() when I want more control over the output. It can also be used outside of WordPress with only slight modification. Continue reading

Category Pagination Fix

Apparently there was a problem with category pagination and pretty permalinks in version 2.7 (and others?).  This plugin claims to be a fix: