Showing multiple blogs on single page

Highlighted
New Member
1 0 0

Is it possible to list multiple blogs on a single page in Shopify? The issue is that our client wants to show a blog that is broken up by year on one page. Since Shopify (inexplicably) can't sort, etc. by date, the idea is to create a separate blog for each year and then order the blocks of code listing the articles by year. I just can't figure out how to create the code for this or even where to put the code once it's created.

Thanks. 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
5704 1 326

Use the global blogs object: http://wiki.shopify.com/Blogs Iterate through each blog. For example:

<h3>2011</h3>
<ul>
{% for article in blogs.2011.articles limit:5  %}
   <li>{{ article.title | link_to: article.url }}</li>
{% endfor %}
</ul>
<p><a href="{{ blogs.2011.url }}">See all 2011 articles</a></p>
<h3>2010</h3>
<ul>
{% for article in blogs.2010.articles limit:5  %}
   <li>{{ article.title | link_to: article.url }}</li>
{% endfor %}
</ul>
<p><a href="{{ blogs.2010.url }}">See all 2010 articles</a></p>
0 Likes
Highlighted
Tourist
3 0 1

I discovered this to be the best way around this annoying issue: 

1) Go to Customize Store

2) Select "Add Section" then "Image with text"

3) Select an image for your blog

4) Insert blog title in Heading and blog excerpt in Text

5) Insert "Read" or "Continue reading" in Button label

6) Insert link to blog post in Button link

Highlighted
New Member
2 0 0

thank you this worked. 

0 Likes