I have the below code for a page, where I am pulling a photo, title and excerpt of the last 10 articles.
The problem is, I don't know how to add pagination?
I have installed WP-PageNavi aswell. I've seen some similar problems solved but I can't really get the concept at all and I am first trying to make sure that this is possible?
<?php /* Template Name: Opinion */ ?>
<?php get_header(); ?>
<div id="primary">
<div id="content" role="main">
<div class="clear"></div>
<!---------------------------------------------------------------------------->
<?php query_posts('cat=19&posts_per_page=10');
if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="pages-thumbs">
<a href="<?php echo the_permalink(); ?>"><h2><?php the_title(); ?></h2></a>
<?php the_post_thumbnail('medium'); ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php the_excerpt(); ?>
</div>
</div>
<?php endwhile; endif; wp_reset_query(); ?>
<!---------------------------------------------------------------------------->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>