Info
- 2 posts
- 2 voices
- Started 2 years ago by Null
- Latest reply from Ben L.
- This topic is not resolved
How to use bbpress pagination in a plugin?
-
- Posted 2 years ago #
Hi,
I have the data, but how to use it with bbpress' pagination? Where to put the data?
I have for excample:
$mydata= the array with rows from the database that gets displayed
$mydata_count= total rows counted
$mydata_pagelimit= total rows that must be shown each pageIs there any way to hook this into bbpress pagination at all? Or do I have to write one myself?
Kind regards,
-
- Posted 2 years ago #
Assuming that
$mydata_curpageis the current page number (starting from 1):bb_paginate_links( array( 'total' => ceil( $mydata_count / $mydata_pagelimit ), 'current' => $mydata_curpage ) )You'll have to do the actual pagination yourself, but that's as simple as an
array_slice. -
You must log in to post.