How to paginate custom loop?
-
I have WP-PageNavi and it is working great but I cant get this one loop to paginate. Thought someone might be able to point me in the right direction. `$querystr = “
SELECT distinct wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta, $wpdb->postmeta wpostmeta2
WHERE wposts.ID = wpostmeta.post_id AND
wpostmeta.meta_key=’closed’ AND wpostmeta.meta_value=’0′
AND
wposts.ID = wpostmeta2.post_id AND
wpostmeta2.meta_key=’featured’ AND wpostmeta2.meta_value=’1′
AND
wposts.post_status = ‘publish’
AND wposts.post_type = ‘customtax’
“;
$pageposts = $wpdb->get_results($querystr, OBJECT);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘How to paginate custom loop?’ is closed to new replies.