[wp-hackers] Help with wpPaginate plugin?

Ryan Boren ryan at boren.nu
Tue Jan 25 18:15:19 GMT 2005


On Tue, 2005-01-25 at 08:06 -0500, scriptygoddess wrote:
> Hey there!
> I'm trying to get the update to my wpPaginate plugin working with WP
> 1.5 - but running into some really odd errors. Specifically when I try
> to get  the total possible number of posts that could be displayed (if
> there were no "next page" "previous page").
> 
> To do that I make a temp query string - and modify it so that the
> "posts per page" is jacked up way high. Then I try to get the total
> number of posts that query string would return.

nopaging will turn off WP's internal paging, allowing you to supply your
own.

function no_page($query_string) {
  $query_string = add_query_arg('nopaging', true, $query_string);
  return $query_string;
}

add_filter('query_string', 'no_page');


You can also set posts_per_page to -1 to turn off paging.

Ryan



More information about the hackers mailing list