Try using:
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 3, 'cat' => '-10, -72&paged=' . $paged) ); ?>
Then use the next/previous template tags as per usual.
Thread Starter
leads
(@leads)
Hi. Thanks for that. Tried the next/prev links in various place, but can’t get them to appear on my page
<?php
get_header();
?>
<h1 class="hide">Name Creative</h1>
<div id="featuredProject">
<?php $loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 1, 'cat' => '10' ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail( 'single-post-thumbnail' ); ?></a>
<ul>
<li><?php foreach((get_the_category()) as $cat) { if (!($cat->cat_ID=='71' || $cat->cat_ID=='13' || $cat->cat_ID=='10')) echo '<a href="' . get_bloginfo('url') . '/category/' . $cat->category_nicename . '/">'. '' . $cat->cat_name . '</a>';} ?>
</li>
<li class="date"><?php the_time('d.m.y') ?></li>
<li><h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2></li>
</ul>
<?php endwhile; ?>
</div>
<div class="row">
<ul>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 3, 'cat' => '-10, -72&paged=' . $paged) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail(); ?> <?php the_title(); ?></a>
<span><?php the_time('d.m.y') ?></span>
</li>
<?php endwhile; ?>
</ul>
</div>
<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
Try it with something like this:
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
in stead of:
<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
Thread Starter
leads
(@leads)
Hi. Thanks but that doesn’t display anything either.
This is my current setup. It’s a template which has been set as my homepage
http://code-bin.homedns.org/828
thanks for your time and input.
Tom