List Blog Articles in Footer

We use footer,header as a snippet in sections.
e.g. In sections folder there is a file called "footer.liquid".You can partial this footer to the parts and include snippets to footer.

Structure for blog post in footer

  1. Sections Folder -> footer.liquid (section)
  2. Snippets Folfer -> footer-v1.liquid (snippet)
  3. We include "footer-v1.liquid" snippet in "footer.liquid" section
  4. In "footer-v1.liquid" snippet use function below to call blog articles
  5. blogs['blog'] -> blog must be the name of article category name.

Add liquid loop to footer

<ul class="list-unstyled mb-0">
    {% for singleBlog in blogs['blog'].articles %}
    <li><a href="{{ singleBlog.url }}">{{ singleBlog.title }}</a></li>
    {% endfor %}
</ul>

Limit article

<ul class="list-unstyled mb-0">
    {% for singleBlog in blogs['blog'].articles limit:2 %}
    <li><a href="{{ singleBlog.url }}">{{ singleBlog.title }}</a></li>
    {% endfor %}
</ul>

Shopify Article Object