I don’t know what largo_content_nav()
does but you clobber the main query here:
query_posts('posts_per_page=1');
And then several lines later attempt to paginate (or so the function name and argument suggest):
largo_content_nav( 'nav-below' );
If largo_content_nav
uses the global
variable $wp_query
which I kind think it must since you don’t pass it a WP_Query
object, then you are paginating based on an object that is different from the one used to load the page. That is:
- Long before the theme templates load, WordPress creates the
$wp_query
global
based on various query parameters and rewrite
rules. - The page loads according to information in that query
- You, by using
query_posts
which you should never do, then
overwrite$wp_query
- And attempt to paginate. Unfortunately you’ve altered the query at
step #3. Things are out of sync.
I don’t honestly understand (or I am not sure that I understand) what you are trying to accomplish with this block of code, but your comment below …
All I needed to do was show 1 full post per page on the archives for
this taxonomy term.
… makes me think that all you want to do is limit your archives to a single result per page. You have two loops on the page, but it seems that you only want one and have cooked up something odd and wildly complicated. I think what you need is:
function single_per_page_archive_wpse_133857($qry) {
if ($qry->is_main_query() && $qry->is_archive()) {
$qry->set('posts_per_page',1);
}
}
add_action('pre_get_posts','single_per_page_archive_wpse_133857');
And remove most of this:
// and finally wind the posts back so we can go through the loop as usual
rewind_posts();
query_posts('posts_per_page=1');
while ( have_posts() ) : the_post();
get_template_part( 'content', 'singleseries' );
endwhile;
Keeping just this (I think):
get_template_part( 'content', 'singleseries' );