I have an archive-regularproducts.php
set up that looks like so:
PHP:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
//content goes here
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
<?php query_posts( 'post_type=wpsc-product'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
//content goes here
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
<nav id="page_nav">
<?php posts_nav_link( ' ', ' ', ' '); ?>
</nav>
As you can see I'm also querying the wpsc-product
post type on this archive page too, the posts display fine, but as I'm using infinite scroll, when it gets to the bottom and pulls in the next page of posts, it's pulling in duplicate wpsc-product
posts, thus I was wondering if there was a way to either have the posts_nav_link
function for only the regularproducts
post type, or a generally better way of achieving what I'm trying to achieve. Any suggestions would be greatly appreciated!
query_posts
should not be used. Here is an explanation