No show paging links
-
Hi,
I’m trying to display a list of post using a custom query string, but i cannot show the paging links. This is my code:
if ($_GET['paged']) { $offset = (get_query_var('paged')) ? get_query_var('paged') : 1; } else { $offset = 0; } $posts_x_page = get_option('posts_per_page'); $args = array( 'post_type' => 'post', 'meta_key' => 'artist', 'meta_value' => '1', 'numberposts' => $posts_x_page, 'offset' => $offset, 'post_status' => 'publish' ); $pageposts = get_posts($args); ?> <table class="list_ads" border="0" cellpadding="0" cellspacing="0"> <?php if ($pageposts): ?> <?php foreach ($pageposts as $post): ?> <?php setup_postdata($post); ?> Posts code <?php endforeach; ?> </table> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php endif; ?>Thanks all!!!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘No show paging links’ is closed to new replies.