You can not use the built-in pagination, but to use the pagination use OFFSETand LIMITin its request. So do your own pagination:
<?php
$offset = 0;
if(isset($_GET['page']) && !empty($_GET['page']) {
$offset = ($_GET['page']-1) * 10;
}
$wpdb->get_col("SELECT pic_thumb_url FROM wp3_bp_album
WHERE owner_type = 'user' ORDER BY title DESC
LIMIT 10 OFFSET $offset"
);
?>
<a href="/currentpage/?page=<?php echo $_GET['page']-1 ?>">previous</a>
<a href="/currentpage/?page=<?php echo $_GET['page']+1 ?>">next</a>
Not perfect, it does not check whether you are on the first or last page, but at least the first check that you must create yourself.
source
share