• Resolved borimrr

    (@borimrr)


    I used query_posts to specify that my index.php should only display the posts form category 1. Each page cannot have more than 4 posts and I have 5 to test pagination. The issue arises when I click the link to go to page 2 the navigation links change and the page reloads, but I get the same first 4 posts. LEt me know if oyu need anything else besides my index.php

    <?php get_header(); ?>
    
    <div id="container">
    	<img id="detail" src="<?php bloginfo('url'); ?>/wp-content/themes/NJ History Makers/main/leftdetail.jpg" />
       	<h1>&nbsp;HM Blog</h1><br />
    
    	<?php
    		query_posts('cat=1');
    		if(have_posts()): ?>
    
    	<?php while(have_posts()) : the_post(); ?>
    
            <div class="post" id="post-<?php the_ID(); ?>">
    
    			<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?> &raquo;</a></h2>
    
           		<div class="entry">
    
            		<?php the_excerpt(); ?>
    
                    <p class="postmetadata">
    <?php _e('Posted in'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php  the_author(); ?> on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> :: <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php //edit_post_link('Edit', ' | ', ''); ?>
    				</p>
    
            	</div>
    
            </div>
    
    	<?php endwhile; ?>
    
        <div class="navigation">
    		<?php posts_nav_link(' ','&laquo; Previous Entries','Next Entries &raquo;'); ?>
    	</div>
    
        <?php else : ?>
    
    		<div class="post">
    			<h2><?php _e('Not Found'); ?></h2>
    		</div>
    
    	<?php endif; ?>
    
    </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    
    </div>
    
    </body>
    </html>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress loop set to one category, but no pagination.’ is closed to new replies.