• Resolved ltdstylo

    (@ltdstylo)


    Hi all,

    I’m having a problem that’s fairly well documented but the solutions listed haven’t worked for me. I’m pretty sure pagination was working when I launched the site but now it seems to be displaying only the first page. I’m using a custom template and category posts are grouped on a page using this;

    <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<p class="evarchive"><a>"><?php the_title(); ?></a></p>
    	<?php endwhile; else: endif; ?>
    	<p><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?><p>

    The common solution is to include;

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

    before my query_posts but that doesn’t seem to make any difference. Any insight would be appreciated, thanks

    [Please post code snippets between backticks or use the code button.]

Viewing 1 replies (of 1 total)
  • Thread Starter ltdstylo

    (@ltdstylo)

    For any one having this problem with this specific query the solution is to add the paged parameter inside query_posts like so;

    <?php query_posts('category_name='.get_the_title().'&post_status=publish,future&paged=' . get_query_var('paged'));?>

    [Please post code snippets between backticks or use the code button.]

Viewing 1 replies (of 1 total)

The topic ‘page/2 displaying the same page’ is closed to new replies.