I'm trying to use the code from this page:
Display Blog Posts on any Page (with navigation) http://digwp.com/2013/01/display-blog-posts-on-page-with-navigation/
My goal is to make pages that display the posts from one category only. I'd also like to limit the number of posts per page to 5 and have pagination links at the bottom.
This will display the first 5 posts form all categories and paginate them:
<?php // Display blog posts on any page @ http://m0n.co/l
$temp = $wp_query; $wp_query= null;
$wp_query = new WP_Query(); $wp_query->query('showposts=5' . '&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
However when I try to add the category in like this:
<?php // Display blog posts on any page @ http://m0n.co/l
$temp = $wp_query; $wp_query= null;
$wp_query = new WP_Query(); $wp_query->query('cat=61' , 'showposts=5' . '&paged='. $paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
I get more than 5 posts on my page and no pagination...