WordPress.org

Ready to get started?Download WordPress

Forums

Older Entries and Newer Entries Show Same Posts (1 post)

  1. backpages
    Member
    Posted 5 years ago #

    I've created my own theme. We have 5 different categories of posts. I'm trying to create a page that lists all the older posts for one particular category. Basically, an archives page for this category. I have created a new "page" in WordPress and created a "template" page for this page to use. In my template page I use the code below to find all the "dailydiversion" postings and display the title and the date. It works fine. The only problem is when you click on the "Older Entries" or "Newer Entries" links at the bottom it still shows the same 10 posts. There are currently 26 posts for this category and WordPress seems to know this, as it builds 3 pages, but each page shows the same 10 posts. Here's a link to the page in question: http://www.redpepperland.com/daily-diversion-archives. Any help with what I'm doing wrong would be greatly appreciated. Thank you very much.

    ' <?php query_posts('category_name=dailydiversion'); ?>
    <?php if (have_posts()) : ?>

    <h2 class="posttitle">Daily Diversion Archives</h2>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post"><h3 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> - <span class="thedate"><?php the_date('n.j.y') ?></span></h3>
    </div><!-- post div ENDS here -->
    <div class="searchdivider"><img src="http://www.redpepperland.com/wp-content/themes/the_seed/images/searchdivider.jpg" alt="" width="339" height="1" /></div><!-- searchdivider div ENDS here -->
    <?php endwhile; ?>

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
    </div>
    <?php endif; ?> '

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.