pagination on category template problem
-
i have a special category template im using for a specific category. but i want to control the amount of posts displayed separately from what the wordpress reading settings are set to. the pagination when clicked to the next page displays the same posts and not the older ones. i have been searching the codex and cant seem to get the right fix. could someone lead me in the direction, i would really appreciate it. this is where im left off of trying different query’s….. i have tested many more but i figured i would post this since i havent had success with anything. thanks in advance for any help! here is my code –
<?php get_header(); ?> <?php get_sidebar(); ?> <?php global $wp_query; query_posts( array_merge( array('cat' => 3), $wp_query->query ) ); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="recent-news"> <div class="post-thumbnail"> <?php the_post_thumbnail(); ?> </div><!--end post-thumbnail--> <div class="latest-news"> <div class="post-title"><h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></div> <p><?php $excerpt = get_the_excerpt(); echo string_limit_words($excerpt,40); ?>... <a href="<?php the_permalink(); ?>">Read More</a></p> <div class="datetime"><?php the_author(); ?> - <?php the_time('l, F j, Y G:i'); ?> <?php comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?'); ?></div> </div><!--end latest-news--> </div><!--end recent--> <?php comments_template(); // Get wp-comments.php template ?> <?php endwhile; else: ?> <h2>Woops...</h2> <p>Sorry, no posts we're found.</p> <?php endif; ?> <div class="clearfloat"></div> <div id="post-nav"><p align="center"><?php posts_nav_link(); ?></p></div><!--end post-nav--> </div><!--end wrapper--> <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘pagination on category template problem’ is closed to new replies.