Pagination For Custom Query
-
Hi
I have been using pagination code for my custom query, generated from custom plugin. I would like to know, how to use the query result in the below code. Thanks in advance.
For ex - $qry = $wpdb->get_results('select * from table');
Where to pass this $qry ?<? echo '<div class="pagination">'; echo paginate_links( array( 'base' => add_query_arg( 'cpage', '%#%' ), 'format' => '', 'prev_text' => __('«'), 'next_text' => __('»'), 'total' => ceil($resultcount / $post_per_page), 'current' => $page, 'type' => 'list' )); echo '</div>'; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pagination For Custom Query’ is closed to new replies.