• Using the standard twenty-ten loop.php I am having a strange problem. each page shows Older and Newer posts at top and bottom EXCEPT on the latest page where it only shows in the bottom navigation. I can’t see any difference in the code between the two. I am using a custom post type query in the page which then uses the default loop. Everything else seems to be fine!

Viewing 2 replies - 1 through 2 (of 2 total)
  • do you include pagination in your custom query?

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array(
    	'post_type' => 've_products', // custom post type
             'paged'=>$paged,
            ));
    ?>

    it is a css trick so that the asymetric link does not show above the posts on the front page; using the body class .paged to make the link visible:

    style.css:

    #nav-above {
    	display: none;
    }
    .paged #nav-above,
    .single #nav-above {
    	display: block;
    }

    (if you look into the html code in the browser, you will see the link above the posts (similar to this):

    <div id="nav-above" class="navigation">
    
    		<div class="nav-previous"><a href="http://localhost/wordpress/page/2" ><span class="meta-nav">&larr;</span> Older posts</a></div>
    		<div class="nav-next"></div>
    	</div><!-- #nav-above -->
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘previous_posts_link in twenty-ten’ is closed to new replies.