blog

The blog object has the following attributes:

blog.all_tags

Returns all tags of all articles of a blog. This includes tags of articles that are not in the current pagination view.

Input

{% for tag in blog.all_tags %}
    {{ tag }}
{% endfor %}

Output

News, Music, Sale, Tips and Tricks

blog.articles

Returns an array of all articles in a blog. See this page for a list of all available attributes for article.

Input

{% for article in blog.articles %}
    <h2>{{ article.title }}</h2>
{% endfor %}

Output

<h2>Hello World!</h2>
<h2>This is my second post.</h2>
<h2>Third time's a charm!</h2>

blog.articles_count

Returns the total number of articles in a blog. This total does not include hidden articles.

blog.comments_enabled?

Returns true if comments are enabled, or false if they are disabled.

blog.handle

Returns the handle of the blog.

blog.id

Returns the id of the blog.

blog.moderated?

Returns true if comments are moderated, or false if they are not moderated.

blog.next_article

Returns the URL of the next (older) post. Returns false if there is no next article.

blog.previous_article

Returns the URL of the previous (newer) post. Returns false if there is no next article.

blog.tags

Returns all tags in a blog. Similar to all_tags, but only returns tags of articles that are in the filtered view.

blog.title

Returns the title of the blog.

blog.url

Returns the relative URL of the blog.

Want to discuss this page?

Visit the Shopify Community