Skip to content

Instantly share code, notes, and snippets.

@jmuspratt
Created May 15, 2015 22:04
Show Gist options
  • Save jmuspratt/fa1b682e83ccaa22eae1 to your computer and use it in GitHub Desktop.
Save jmuspratt/fa1b682e83ccaa22eae1 to your computer and use it in GitHub Desktop.
<ul class="prev-next cf">
{% set params = {section: 'blog', order: 'postDate desc', limit: null} %}
{% set entry_prev = entry.getPrev(params) %}
{% set entry_next = entry.getNext(params) %}
{% if entry_prev %}<li class="prev"><a title="{{ entry_prev.title }}" href="{{entry_prev.url}}">Previous Post</a></li>{% endif %}
{% if entry_next %}<li class="next"><a title="{{ entry_next.title }}" href="{{entry_next.url}}">Next Post</a></li>{% endif %}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment