Anyone here see why my pagination won't work? I can get "previous page" to show up, but when navigating to "page-2", the content will stay identical to the content on "page-1".
<?php
/*
Template Name: Generic Trips Template
*/
?>
<?php get_header(); ?>
<?php get_template_part( "beforeloop", "page" ) ?>
<?php $types = $post->post_name; ?>
<?php if (have_posts()) : ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array( 'post_type' => 'trips', 'types' => $types, "posts_per_page" => 5)); ?>
<?php while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="post">
</article>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) : ?>
<div class="pnavi">
<?php wp_pagenavi(); ?>
</div>
<?php else : ?>
<div class="alignleft"><?php next_posts_link(__('« Older Entries')); ?></div>
<div class="alignright"><?php previous_posts_link(__('Newer Entries »')); ?></div>
<?php endif; ?>
<?php endif; wp_reset_query(); ?>
<?php get_template_part( "afterloop", "page" ) ?>
<?php get_footer(); ?>