Archive Page Query Issue
-
Thank you guys for your help in advance.
The page i’m working on is http://www.ourvinyl.com
if you go to the archives page you will see a list of about 20 posts, that are in no particular order.
Now if you click on page 2 and on, you’ll see the results the exact way they were meant to be seen. As you can see from the code below, the page is supposed to display 6 posts per page. I have no idea why i’m getting this problem on page 1 but none of the others. I have wasted many days on this issue. I have no idea why theres 20 posts showing up, and why they’re not in chronological order.
<?php /* Template Name: Category Archive */ ?> <?php get_header(); ?> <?php if (have_posts()) : ?> <div id="primary"> <h1>Our Vinyl Archives</h1> <div class="line"> <img src="<?php bloginfo('template_url'); ?>/images/line.png" /> </div> <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('showposts=6'.'&paged='.$paged); ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?><br/> <div class="search"> <div id="search-entry"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?> </a> <div id="excerpt"> <h2><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></h2> <p class="meta"> <?php the_time(get_option('date_format')); ?> | <?php comments_number(); ?> - Category: <?php the_category(' '); ?> </p> <!--post meta data--> <h5> <?php the_excerpt(); ?> </h5> <div class="readmore"><a href="<?php the_permalink(); ?>">Read More >></a></div> </div><!--end of right excerpt--> </div><!--end of search entry--> </div><!--end of primary--> <?php endwhile; ?> <?php include (TEMPLATEPATH . '/inc/nav.php' ); ?> <?php else : ?> <div id="primary"> <h1>No Posts Found</h1> <?php endif; ?> </div> <!--end of primary--> <?php get_sidebar(); ?> <?php get_footer(); ?>Thank you guys for any help you can give me.
-Matt
The topic ‘Archive Page Query Issue’ is closed to new replies.