WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Link to Last Page (4 posts)

  1. chungste
    Member
    Posted 8 years ago #

    My wordpress is setup so that the posts show chronologically because I wanted it to tell more like a timeline story. Well I got that working fine by editing a few of the sql query line in the includes files.

    What I want is a link on the first page that goes to the very last page (i.e. the most recent posts). Currently, I have a link that adds "?order=desc" to the URL to show the most recent posts. But then the posts are in reverse chronological order, so what I would prefer is a link the last page. Is there a way to calculate that dynamically (i.e. as pages/posts grow) and post a link somewhere?

    Thanks in advance.

  2. Jonathan Landrum
    Member
    Posted 8 years ago #

    First off, Steve, I really like the site! I've seen a lot of sites for kids lately. Are you going to leave it up for "peanut" to blog on a few years down the road? (I think baby is a girl, btw.)

    What I did to keep readers updated is put a div in the sidebar that lists the five most recent posts, in case they haven't visited in a while. It's just a wp_get_archives call with the type set to "postbypost" and the limit set to "5". That produces an unordered list with the most recent post at the top of the list.

    Hope this helps.
    ~Jonathan

  3. chungste
    Member
    Posted 8 years ago #

    Thanks... for the complement and also the tip. I think I will use both the DESC link and the sidebar with the 5 latest posts. Nice work.

  4. Jonathan Landrum
    Member
    Posted 8 years ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic