Hey Lemonade,
Unfortunately the only way to order the blog posts is alphabetically, either from oldest to newest or from newest to oldest. You can set it so that they are ordered chronologically by their 'published_at' date, which is explained here: http://wiki.shopify.com/Article#article.published_at
The only way I know that you can sort natively is either in time forward or in time backwards. Backwards by using the reversed filter:
See reversing the loop:
https://github.com/Shopify/liquid/wiki/Liquid-for-Designers
You can try hacking it in jQuery but I wouldn't advise on more than a list of articles: http://ecommerce.shopify.com/c/ecommerce-design/t/sort-a-blog-alphabetically-i-was-so-close-46449
You could sort them by article.id
{% assign article_list = blog.blog_name.articles | sort: "id" %}
{% for single_article in article_list %}
{{article.title}}
{% endfor %}
Hey, I'm also trying to sort blog posts alphabetically. this works for me in blog.athletes.liquid. BUT the problem is, that this code won't work with tags anymore. /blog/athletes/tagged/xyz
<div id="page" class="desktop-12 tablet-6 mobile-3">
<h1 class="page-title">{% if current_tags %}{{ blog.title | link_to: blog.url }} » {{ current_tags.first }}{% else %}{{ blog.title }}{% endif %}</h1>
{% paginate blog.articles by 200 %}
<div class="desktop-12 tablet-6 mobile-3">
<div id="article-loop">
{% assign articles = blogs.athletes.articles | sort: 'title' %}
{% for article in articles %}
{% include 'athlete-loop' %}
{% endfor %}
</div>
</div>
{% endpaginate %}
</div>
This code works with different tags, but it doesn't sort it alphatebitaly:
<div id="page" class="desktop-12 tablet-6 mobile-3">
<h1 class="page-title">{% if current_tags %}{{ blog.title | link_to: blog.url }} » {{ current_tags.first }}{% else %}{{ blog.title }}{% endif %}</h1>
{% paginate blog.articles by 200 %}
<div class="desktop-12 tablet-6 mobile-3">
<div id="article-loop">
{% for article in blog.articles %}
{% include 'athlete-loop' %}
{% endfor %}
</div>
</div>
{% endpaginate %}
</div>
Any idea, how i could get it sorted alphabetically but also still work with tags?
Hey Lemonade_NY, I've actually made an app to drag and drop blogs into the positions you would like. Here's the link to the Shopify App: Article Organizer Pro
User | Count |
---|---|
13 | |
11 | |
8 | |
7 | |
7 |