Support » Requests and Feedback » get_archives offset parameter

get_archives offset parameter

  • I would like to set up my site to include a “Recent Posts” listing. If, for example, the blog displayed the 10 newest posts (“entries 1 – 10”) then I would like “Recent Posts” to list the tiles of “entries 11 – 20”.
    To do this would only require adding an additional parameter to get_archives which specifies the “entry #” at which to start.
    I could write it myself (and just might), but this introduces maintenance hassles and I think it might be of value to others.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You probably don’t want to provide entry #, as that would require knowing what the most recent post # is. A simple offset would be nice to start with.
    But while we’re talking about the get_archives function, why is limit a string parameter? It should really be an int.

    what “unregistered” has asked is just what I am trying to do, unfortunately, writing it myself is not an option, as I have no clue 🙂

    I am using Hemingway, which shows the most recent 2 posts in the main body. So in the sidebar, where I am listing “recent entries”, I want to EXCLUDE those last 2 entries. how can I do this?

    thanks, Elisabeth

    Please, don’t double post after 19 minutes!!!
    (usually it gets deleted)

    I didn’t mean to- promise! I got a message saying “Something odd happened.”- so I thought that meant my reply didn’t work- that’s why I tried to repost. *sorry*

    If your theme is using the “get_archives” template tag mentioned in the title of this topic – that one does NOT have an offset parameter:
    Your best bet would be to ask the author of the theme about your request.

    I don’t know how to know if my theme uses that template tag or not, nor am I familiar with the parameters… I have asked at the Hemingway site. thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘get_archives offset parameter’ is closed to new replies.