WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Missing "Previous Posts" link at bottom of page

[Resolved] Missing "Previous Posts" link at bottom of page

  • I searched the forums and found a few closed threads about this subject, but none of those threads provided information on how to fix the problem. So I’m posting it myself. Sometimes the “previous posts” link is at the bottom of the page, but most of the time it isn’t.

    Any help in resolving this would be greatly appreciated. Thanks in advance.

    My website is http://www.paledogstudios.com

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sometimes the “previous posts” link is at the bottom of the page, but most of the time it isn’t.

    can you be more specific?
    links to pages where ‘previous posts’ shows,
    and links where you think it should, but does not?

    I mean, the previous posts link is missing from the bottom of the main page of the site.

    you have 6 posts on the front –
    how is your setting in ‘dashboard’ ‘settings’ ‘reading’ ‘Blog pages show at most [] posts’ ?

    have a look into index.php (or the template file that displays your front page) and see if you can find the previous_posts_link() code somewhere after the endwhile; of the loop.

    ( http://codex.wordpress.org/The_Loop_in_Action#The_World.27s_Simplest_Index_Page )

    if not, add the respective code.
    http://codex.wordpress.org/Function_Reference/next_posts_link
    http://codex.wordpress.org/Function_Reference/previous_posts_link

    if you need further help, you could paste the code of the frontpage template (index.php ?) into a http://wordpress.pastebin.com/ and post the link to it here.

    I really know very very little about editing wordpress files. But I posted the index.php code for my site here: http://wordpress.pastebin.com/eByqx7bv

    I looked for that “previous_posts_link()” thing, but didn’t see it at all. And I really wasn’t sure where to even put the code that you linked to.

    Just to clarify, all I want is a link at the bottom of the main page that allows you to get to older blog posts. I really wish I understood all this stuff better.. So thank you for your help so far.

    this area:

    <?php comments_template(); ?>
    <?php endwhile; endif; ?>

    you could try and change it to:

    <?php comments_template(); ?>
    <?php endwhile; ?>
    
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    </div>
    
    <?php endif; ?>

    (the above added code is taken from the old default theme kubrick; and contains some html for formatting)

    I swapped the code where you specified and I don’t see any discernible difference on the page. Was I supposed to do something else?

    there is a very pale ‘older entries’ link in the left corner, just below the last grey block.

    to make the changes visible, you might need to relaod the page in the browser or press ‘ctrl f5’ to clear the browser cache.

    for possible formatting of the links, you could add something like this to style.css of your theme:

    .navigation a:link { margin: 0 10px; color: #333; }
    .navigation a:hover { margin: 0 10px; color: #777; }

    Thanks so much for all the help. Every time I go in and solve a problem, I learn a little more about all this crazy coding stuff. Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Missing "Previous Posts" link at bottom of page’ is closed to new replies.
Skip to toolbar