How to List all posts with full content

Updated: April 07, 2021


Drive 20-40% of your revenue with AVADA
avada email marketing

It’s common to display a list of posts on your homepage so that your customers can easily catch sight of all of your posts in different topics. If you want to make this list on your own page, you have to read carefully this instructional writing on How to list all posts with the full content to get more information.

How to list all posts with full content

Step 1: How to create a layout

Before taking an official step on adding the code to list your posts on your site with full content, you need to know How to create a layout that will display the posts.

In _layouts directory, create a new file called home.html and add the following logic:

layout: default

{{ content }}
<ul class="myposts">
{% for post in site.posts %}
    <li><a href="{{ post.url }}">{{ post.title}}</a>
    <span class="postDate">{{ | date: "%b %-d, %Y" }}</span>
{% endfor %}

Step 2: Create

Then, in your root directory, create a file called and specify the home layout:

title: Blog
layout: home

From that, contents of will be pushed into the {{ content }} tag in the home layout which will be pushed into the {{ content }} tag of the default layout.

Step 3: Generate post list

Now, just embark on creating the code to make your posts appear right on your page with full content of each post.

site.posts directory contains all of the posts and helps you show them on your own homepage. Therefore, it is basically a matter of iterating over it. If you want to show the entire content of this post, you have to add exactly the following code:

{% for post in site.posts %}
      <a href="{{ post.url }}">
        {{ post.title }}
    <time datetime="{{ | date: "%Y-%m-%d" }}">{{ | date_to_long_string }}</time>
    {{ post.content }}
{% endfor %}

Your setting process is completed and it is ready for your customers to see all your posts with full content.


It is much easier for your customers when they can see all of your posts with their full content right on your website. These posts are put in a default layout so that customers can be able to find them in a simple way. With some very basic steps above, we hope that this post brings useful information in your web development process. Do not forget to keep following us in next informative tutorials. Thank you for reading!

Recommend for you
Image Description
SMS, Email Marketing Automation

Top rated Marketing automation for Shopify stores

Learn more
Image Description
SEO Suite

Auto-optimize website elements and structure in one-click.

Learn more
Boost Sales [Free]

Boost sales: Sales Pop, Trust badges, Countdown timer, more

Learn more
Image Description
Photo Reviews [Free]

Use photo reviews to boost sales

Learn more


Stay in the know

Get special offers on the latest news from AVADA.

40k subscribers has been joined!

Earn $10 in reward now!

go up