[Resolved] Custom Loop Pagination
Hey, I was wondering if anyone could help me with this.
I am using a custom bit of code to organize my posts by custom field. The code works fine, but it is not paginating properly. The code is as follows:
<?php $querystr = " SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'acronym' AND wposts.post_type = 'post' ORDER BY wpostmeta.meta_value ASC "; $pageposts = $wpdb->get_results($querystr, OBJECT); ?> <?php if ($pageposts): ?> <?php foreach ($pageposts as $post): ?> <?php setup_postdata($post); ?> <!-- Post Stuff Goes Here --> <?php endforeach; ?> <?php endif; ?>
Any help would be appreciated. Thanks!
- The topic ‘[Resolved] Custom Loop Pagination’ is closed to new replies.