• Resolved spanio

    (@spanio)


    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 https://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?

    Thread Starter spanio

    (@spanio)

    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.

    ( https://codex.www.ads-software.com/The_Loop_in_Action#The_World.27s_Simplest_Index_Page )

    if not, add the respective code.
    https://codex.www.ads-software.com/Function_Reference/next_posts_link
    https://codex.www.ads-software.com/Function_Reference/previous_posts_link

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

    Thread Starter spanio

    (@spanio)

    I really know very very little about editing wordpress files. But I posted the index.php code for my site here: https://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)

    Thread Starter spanio

    (@spanio)

    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; }

    Thread Starter spanio

    (@spanio)

    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 ‘Missing "Previous Posts" link at bottom of page’ is closed to new replies.