[wp-hackers] simplest way to handle pagination with an admin page added via a hook

chays whoooo at gmail.com
Mon Jan 28 11:38:15 GMT 2008


Heya,

I am writing a plugin that adds a page to the admin area. The added page
displays posts using a loop that is VERY similar to wp-admin/edit.php  -- In
fact, the loop is nearly identical except that $posts is filtered.

I see that I can control the display of posts by editing wp(), ie:

wp("posts_per_page=5");

and that works fine on my plugin page.

What I am trouble with is doing the pagination should it be necessary.



Since the user of the plugin will be able to change that setting, and since
even unchanged the list of posts displayed could get quite long..


Whats the easiest way to accomplish that on a plugin added page?

Thanks in advance,

Cherie


More information about the wp-hackers mailing list