pagination doesn't work! please help me
-
hi,
i have a wordpress loop. it’s really simple. it takes posts from a certain category and shows them in that section. but when you click “older posts” instead of showing the older posts it shows the same page of posts on the 2nd page.
something must be wrong with my code, which is below. can anyone please help me? thanks!!
<?php /* Template Name: Conspiracy */ ?> <?php get_header(); ?> <div id="page-wrap"> <div id="main"> <div class="loop"> <?php query_posts('cat=7'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div id="datebox"> <p class="day"><?php the_time('d') ?></p> <p class="month"><?php the_time('M') ?></p> <p class="year"><?php the_time('Y') ?></p> </div> <h2 class="floatLeft"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php the_title(); ?></a></h2> <br class="clear"/> <?php echo get_post_meta($post->ID, 'image', true);?> <?php the_content('Watch The Video / Have your say!'); ?> <p><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?'); ?></p> <br class="clear"/> </div> <?php endwhile; ?> <ul> <li><?php next_posts_link('« Older Entries') ?></li> <li><?php previous_posts_link('Newer Entries »') ?></li> </ul> <?php else : ?> <h2>Not Found</h2> <?php include (TEMPLATEPATH . '/searchform.php'); ?> <?php endif; ?> </div> <!-- end of main --> </div> <div id="side"><?php get_sidebar(); ?></div> <br class="clear" /> <?php get_footer(); ?>
my website is https://www.allthebestvids.com/conspiracy
THANKS!!! x x x
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘pagination doesn't work! please help me’ is closed to new replies.