Sign in

Link to first and latest posts

  • This topic has 0 replies, 1 voice, and was last updated 1 year, 8 months ago by Avatar photoaliengeo.
Viewing 1 post (of 1 total)
  • Author
  • #6878
    Avatar photoaliengeo

    I’m currently working on a Publii theme for webcomics. On webcomic sites, it’s standard to have menus on each individual post with the following options:

    • First post
    • Previous post
    • Next post
    • Latest post

    I’ve made the menu and the previous/next links, but I’m stuck as to how to reference first and latest posts without hard-coding them, which would quickly become unsustainable as “latest” for some webcomics may change daily.

    I understand how to reference the first and last pages with <code class=”EnlighterJSRAW” data-enlighter-language=”generic”>{{pageUrl @pagination.context @pagination.totalPages}} and  <code class=”EnlighterJSRAW” data-enlighter-language=”generic”>{{@website.url}}.

    How can I reference the first and latest posts without knowing their names or IDs, just that they’re first and last in the total list of published, unhidden posts—or is this even possible?

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.