>
Download This Plugin | |
Download Elegant Themes | |
Name | Boone's Pagination |
Version | 1.1 |
Author | Boone B Gorges |
Rating | 0 |
Last updated | 2012-05-02 02:17:00 |
Downloads |
692
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Boone's Pagination plugin added 15 bytes of resources to the Home page and 32 bytes of resources to the sample Post page.
Boone's Pagination plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Boone's Pagination plugin ads no tables to your Wordpress blog database.Here's how I recommend using the class.
$pargs = array(
'get_per_page_key' => 'perpage',
'get_paged_key' => 'current_page',
'per_page' => 15
);
$pagination = new BBG_CPT_Pag( $args );
$args = array(
...
'posts_per_page' => $pagination->get_per_page,
'paged' => $pagination->get_paged
...
);
query_posts( $args );
setup_query()
method to populate the rest of the class. If you used query_posts()
, you don't need an argument:$pagination->setup_query();
If you use new WP_Query
, you'll have to pass the query object:
$my_query = new WP_Query;
$pagination->setup_query( $my_query );
$pagination->paginate_links();
$pagination->currently_viewing_text();