Hi
I have 2 blog pages within a mainly CMS wordpress site. I have a template file called news that both these blog pages use. The file looks at what page it is and retrieves the post within the relevant category (so 2 categories and 2 pages). I also have archives links at the top of the page, again filtered by categories. This all works fine.
The problem is I wanted to only show the latest 5 posts (within the relevant category) and then have navigation at the bottom for the next 5 posts ect..
When I click next page or previous entries, it just reloads the same page with the same posts. I did notice that the url gets /page/2 added though?!
Below is what I have so far...
Any help is hugely appreciated! ! !
HTML Code:div id="content"> <div id="archiveheader"> <?php //Set the relevant category to the variable if ( is_page('world-heritage-latest') )$C=3; elseif ( is_page('great-lines-heritage-park-latest') ) $C=4; //Display archive years for the selected category, made possible by Kwebble Archives plugin. wp_get_archives('type=yearly&cat='.$C); ?> </div> <?php //Display posts for relevant category query_posts('posts_per_page=5&cat='.$C); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h1>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h1> <?php the_date('', '<h2>', '</h2>'); ?> <div class="entry"> <?php the_content('Read More »'); ?> </div> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div> <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div> </div> <?php else : ?>


LinkBack URL
About LinkBacks
Reply With Quote




