• Resolved ilmattiapascal

    (@ilmattiapascal)


    hi there, i m making a 2012’s child theme, i’ve nearly finished.

    after reading the codex and some of the forum topics i wasn’t able to say to my blog :

    << after 5 posts in the loop, show the “go to older posts” button >>

    i’ve taken as already suggested, the twentyten loop.php code :

    <?php if (  $wp_query->max_num_pages > 3 ) : ?>
    				<div id="nav-below" class="navigation">
    					<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
    					<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
    				</div><!-- #nav-below -->
    <?php endif; ?>

    modified it for twentytwelve, but nothing happened. I paste this code on the index.php at the end, at the beginning, after the endwhile, nearly everywhere on the loop, but nothing happened.

    i also tried with this simplier codes but i really need your help to end this…

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • if you set the number of posts per page in the dashboard – settings – reading – Blog pages show at most [ ] posts to 5, then the ‘newer/older’ links should automatically appear on the index page;

    how many published posts do you have?

    can you post a link to your site to illustrate what is happening right now?

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    thanks alchymyth you were right; sometimes i choose the most complicated way and i don’t see that the solution is under my eyes. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Put Older Posts link in the loop after some posts’ is closed to new replies.