• Resolved wdawson

    (@wdawson)


    OK, so I’m trying to have a page for each of my categories, but don’t want to generate these pages with archive templates. Basically I just want it to be a list of all the posts from that category. Thing is I also want it paginated.

    I did this using query_posts, setting the category and the posts per page. I then added the next page links below this. Now what happens is the “next page” link takes me to a “paged=2” page but it displays the same thing as page 1.

    I just figured out I probably shouldn’t be using query_posts for this, huh? What method would be recommended, get_posts? I checked the codex and can implement something else, just not sure what I should be using in the first place, or how to fix the current query_posts problem.

    Here’s what I current have now (I know nopaging is set to true, I just did this for now, so disregard that):

    <?php query_posts('category_name=tcn-journal&posts_per_page=10&nopaging=true'); ?>
    
    					<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    
    					<div class="fullpost">
    
    						<div class="text_col">
    
    							<div class="postdate_single">
    							[ <?php the_time('F j, Y') ?> ]
    							</div>
    
    							<div class="story_section_inside">
    							<?php echo get_post_meta($post->ID, "section", true);?>
    							</div>
    
    							<div class="posttitle_single">
    							<a href="<?php the_permalink(); ?>">
    							<?php the_title(); ?>
    							</a>
    							</div>
    
    							<div class="postcontent_single">
    							<?php the_excerpt(); ?>
    							</div>
    
    							<div class="moretext">
    							<a href="<?php the_permalink(); ?>">full story &raquo;</a>
    							</div>
    
    						</div>
    
    					</div>
    
    					<?php endwhile; ?>
    
    					<div class="post_nav">
    					<div class="moretext">
    					<?php previous_posts_link(); ?>
    					<span class="next_posts"><?php next_posts_link(); ?></span>
    					</div>
    					</div>
    
    					<?php endif; ?>

    Thanks so much.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘newest post showing at top of every page’ is closed to new replies.