<?php $recent = new WP_Query(); ?><?php $recent->query('cat=3&showposts=4'); ?><?php while($recent->have_posts()) : $recent->the_post(); ?><h2><a href=\"<?php the_permalink() ?>\" rel=\"bookmark\"><?php the_title(); ?></a></h2><?php include (TEMPLATEPATH . '/inc/meta.php' ); ?><?php the_content(); ?><?php endwhile; ?><?php posts_nav_link(); ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id=\"nav-below\" class=\"navigation\"> <div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">←</span> Older posts', 'twentyten' ) ); ?></div> <div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">→</span>', 'twentyten' ) ); ?></div> </div><!-- #nav-below --><?php endif; ?>
<?php next_post_link('<li class="prev-icn">%link</li>'); ?><?php previous_post_link('<li class="next-icn">%link</li>'); ?>
<?php next_posts_link('<span class="prev-icn">Next</span>'); ?><?php previous_posts_link('<span class="next-icn">Previous</span>'); ?>
I have a page on a WP site I am doing that contains all posts form the "Blog" Category, but I don't know how to get the previous post link at the bottom of the post.
I am using this code to display the posts from the category:
You can find the page at http://nimbuswater.com/wordpress/whats-new/
Thanks for your help!
If you're on an archive page, a listing of posts, try this:
You can obviously change the argument here to get different results. I'd check the codex for what you can pass to these things.