{% extends "base.twig" %}

{% block content %}
  <article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
    <section class="article-content">
      <h1 class="article-h1">{{post.title}}</h1>
      <p class="blog-author">
        Posted by {{ post.author.name }} </a> on {{ post.post_date|date}}
      </p>
      <div class="article-body">
        {{post.content}}
      </div>
    </section>
  </article>

  <div class="pagination">
    <ul>
      <li>
        <a href="{{ post.prev.link }}" class="button">{{ post.prev.title }}</a>
      </li>
      <li>
        <a href="{{ post.next.link }}" class="button">{{ post.next.title }}</a>
      </li>
    </ul>
  </div>
{% endblock %}

{% block prefooter %}
  <section class="to-top">
    <a href="#">To Top</a>
  </section>
{% endblock %}

{% extends "base.twig" %}

{% block content %}
  <article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
    <section class="article-content">
      <h1 class="article-h1">{{post.title}}</h1>
      <p class="blog-author">
        Posted by {{ post.author.name }} </a> on {{ post.post_date|date}}
      </p>
      <div class="article-body">
        {{post.content}}
      </div>
    </section>
  </article>

  <div class="pagination">
    <ul>
      {% if post.prev %}
        <li>
          <a href="{{ post.prev.link }}" class="button">{{ post.prev.title }}</a>
        </li>
      {% endif %}
      {% if post.next %}
        <li>
          <a href="{{ post.next.link }}" class="button">{{ post.next.title }}</a>
        </li>
      {% endif %}
    </ul>
  </div>
{% endblock %}

{% block prefooter %}
  <section class="to-top">
    <a href="#">To Top</a>
  </section>
{% endblock %}

Check for the next and previous posts.
Check for the next and previous posts.
