• Clicking back to previous posts I see only the same results, no matter the ?paged=

    Here is my index.php

    <body bgcolor="#E5E5E5" topmargin="0" marginheight="0" marginwidth=5 leftmargin=5 onLoad="preloadImages();">
    
      		<STYLE TYPE="text/css" MEDIA="screen, projection">
    		<!--
      		@import url(http://www.cmj.com/2006.css);
    		-->
    		</STYLE>
    
    	<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
    		<tr>
    			<td>  
    
            	<?php get_header(); ?>
    
    			<div id="content">
    				<h1>CMJ STAFF BLOG</h1>
    				<hr />
    
    				<?php query_posts('cat=-13'); ?> <!--this excludes category 13 (DOWNLOAD THIS) from appearing on the main blog page. added by Ryan Kailath on 6.30.2010-->
    				<?php if (have_posts()) : ?>
    
    				<?php while (have_posts()) : the_post(); ?>
    
    				<div class="post" id="post-<?php the_ID(); ?>">
    
    					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    					<small><?php the_time('l, F j, Y') ?> <!-- by <?php the_author() ?> --></small>
    					<hr />
    
    					<div class="entry">
    						<?php the_content('Read the rest of this entry &raquo;'); ?>
    					</div>
    
    					<p class="postmetadata"><?php if (function_exists('the_tags')) { the_tags('Tags: ', ', ', '<br/>'); } ?>Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    				</div>
    
    				<hr />
    
    				<?php endwhile; ?>
    
    				<div class="navigation">
    					<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    					<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    				</div>
    
    				<?php else : ?>
    
    				<h2 class="center">Not Found</h2>
    				<p class="center">Sorry, but you are looking for something that isn't here.</p>
    				<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    				<?php endif; ?>
    			</div>
    
    			<?php get_footer(); ?>
    
    			</td>
    		</tr>
    	</table>
    
        <p>&nbsp;</p>
        <p>
Viewing 1 replies (of 1 total)
  • try and add the paged parameter to your custom query:
    (you should be able to identify the added code in the snippet below)

    <?php wp_reset_query();
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    <?php query_posts('cat=-13&paged=' . $paged); ?> <!--this excludes category 13 (DOWNLOAD THIS) from appearing on the main blog page. added by Ryan Kailath on 6.30.2010-->
    				<?php if (have_posts()) : ?>
Viewing 1 replies (of 1 total)

The topic ‘Every paginated page shows the same posts’ is closed to new replies.