WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change Newer Entries Link (10 posts)

  1. spencer.li
    Member
    Posted 4 years ago #

    Hi,

    My site have a static home page as the front page, instead of a blog - in Reading Settings, I've setup what the Front page and Posts page are.

    When I go to my blog, I click on the "Older Entries" link at the bottom to read the older posts. All is still good.

    Now, on the preceding page - when I click on "Newer Entries", it takes me to the front page instead of the posts page.

    Can someone tell me what I need to change to make this work please?

    Hope I've explained myself!
    http://www.spencer.li

    Thanks,
    Spencer.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

  3. spencer.li
    Member
    Posted 4 years ago #

    Thanks esmi, but they're exactly what I'm using.

    <div class="left"><?php next_posts_link('Older Entries') ?></div>
    <div class="right"><?php previous_posts_link('Newer Entries') ?></div>

    I think I have the problem because of the static home page being my front page, but I don't really know.

    When I click on the Newer Entried it goes to index.php instead of index.php?paged=1

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    It has nothing to do with the static front page. Try resetting your custom permalinks back to the default setting. If that works, then try reading Using_Permalinks before setting a custom permalink structure back up again.

  5. spencer.li
    Member
    Posted 4 years ago #

    I don't believe I'm using any custom permalinks.

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    In that case, what are you using as the site url?

  7. spencer.li
    Member
    Posted 4 years ago #

  8. esmi
    Forum Moderator
    Posted 4 years ago #

    The site url could be the problem. See Changing_The_Site_URL and try changing it to http://spencer.li

  9. spencer.li
    Member
    Posted 4 years ago #

    Thanks esmi,

    I've changed the "Blog address (URL)" to be http://www.spencer.li/?page_id=7 and it seems to work okay now.

    When clicking on the link, the URL goes a bit funny - http://www.spencer.li/?page_id=7/index.php - but I can live with that.

    Thanks for pointing me to the solution!

  10. spencer.li
    Member
    Posted 4 years ago #

    Alright, this didn't actually work; it made every link go to the first blog!

    After a little thought and investigation, the solution is to not use permalinks. Changing this to include the page name - and now everything works as planned. Permalinks don't make sense if you have a static main page.

Topic Closed

This topic has been closed to new replies.

About this Topic