Skip to main content

blog

Information about a specific blog in the store.

Properties

Anchor to
all_tags
array of string

All of the tags on the articles in the blog.

This includes tags of articles that aren't in the current pagination view.

Anchor to
articles
array of article

The articles in the blog.

Tip

Use the paginate tag to choose how many articles to show per page, up to a limit of 50.

Anchor to
articles_count

The total number of articles in the blog. This total doesn't include hidden articles.

Anchor to
comments_enabled?

Returns true if comments are enabled for the blog. Returns false if not.

The handle of the blog.

The ID of the blog.

Anchor to
metafields
array of metafield

The metafields applied to the blog.

Tip

To learn about how to create metafields, refer to Create and manage metafields or visit the Shopify Help Center.

Returns true if the blog is set to moderate comments. Returns false if not.

Anchor to
next_article

The next (older) article in the blog.

Returns nil if there is no next article.

This property can be used on the article page to output next links.

Anchor to
previous_article

The previous (newer) article in the blog.

Returns nil if there is no previous article.

This property can be used on the article page to output previous links.

Anchor to
tags
array of string

A list of all of the tags on all of the articles in the blog.

Unlike blog.all_tags, this property only returns tags of articles that are in the filtered view.

Anchor to
template_suffix

The name of the custom template assigned to the blog.

The name doesn't include the blog. prefix, or the file extension (.json or .liquid).

If a custom template isn't assigned to the blog, then nil is returned.

The title of the blog.

The relative URL of the blog.

{
"all_tags": [],
"articles": [],
"articles_count": 3,
"comments_enabled?": true,
"handle": "potion-notions",
"id": 78580613185,
"metafields": {},
"moderated?": true,
"next_article": {},
"previous_article": {},
"tags": [],
"template_suffix": "",
"title": "Potion Notions",
"url": "/blogs/potion-notions"
}
Was this section helpful?