Fitur Terbaru Thumbnail Pada Related Post | NextWapBlog.com

Fitur Terbaru Thumbnail Pada Related Post

Administrator • 03 Nov 2017 - 18:37

 {% if site.settings.posts_list_in_singlepost %}
 {% for r_post in recent_posts %}
  <div class="post" id="post-{{ post.id }}">
    <div class="post-heading">
      <h2 class="post-title">
        <a href="/{{ r_post.link }}.html">{{ r_post.title }}</a>
      </h2>
      <span class="post-meta">
        Posted by {{ site.author_name }} on {{ r_post.time|date('d M Y - H:i') }}
      </span>
    </div>
    <div class="post-body">
      {{ site.settings.display_thumbnail == 'yes' ? r_post.thumbnail|raw : '' }}{{ r_post.content|striptags|slice(0,300) }}
    </div>
    <div class="post-footer">
      {% set categories = post.categories|json_decode %} {% if categories %}
      <a class="post-footer-left" href="/category/{{ blog_categories[categories[0]]['link'] }}/1.html">{{ blog_categories[categories[0]]['name'] }}</a>
      {% else %}
      <a class="post-footer-left" href="/category/uncategorized/1.html">Uncategorized</a>
      {% endif %}
      <a class="post-footer-right" href="/{{ post.link }}.html#comments">{{ r_post.total_comments }} Komentar</a>
    </div>
  </div>
  {% endfor %}
  {% endif %}

Untuk div element html bisa dikondisikan sesuaikan dengan template yang sedang dipakai. Demo Klik disini bre.