Paging not working
-
Hey guys,
I am having trouble with my loop…
I have the following code….<?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> <?php // Query Out Database $wpbp = new WP_Query(array( 'post_type' => 'portfolio', 'posts_per_page' => '1' ) ); // Begin The Loop if ($wpbp->have_posts()) : while ($wpbp->have_posts()) : $wpbp->the_post(); ?> <div class="portfolio"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) : ?> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('portfolio'); ?></a> <?php endif; ?> <div class="portinfo"> <a href="<?php the_permalink(); ?>"><span><?php echo get_the_title(); ?></span></a> <p>Lorem ipsum dolor sit amet consecti un atis al nord di amur. Lorem ipsum dolor sit amet conescti un atis al nord di amur. Lorem ipsum dolor sit amet conescti un atis al nord di amur.</p> </div> </div> <?php endwhile; ?> <?php else : ?> <h2>Not Found</h2> <?php endif; ?> <div class="navigation"> <div class="next-posts"><?php next_posts_link('« Older Entries') ?></div> <div class="prev-posts"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php wp_reset_query(); ?> <?php get_footer(); ?>
And I cant get the page navigation to show… it just doesn’t seem to want to work… I have 2 posts so it should let me go to previous posts but doesn’t?
Can anyone help?
Dan
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Paging not working’ is closed to new replies.