VOOZH about

URL: https://shopify.dev/docs/api/liquid/objects/article

⇱ Liquid objects: article


Skip to main content

An article, or blog post, in a blog.

Properties

Anchor to
authorauthor

The full name of the author of the article.

Anchor to
comment_post_urlcomment_post_url

The relative URL where POST requests are sent when creating new comments.

Anchor to
commentscomments
array of comment

The published comments for the article.

Returns an empty array if comments are disabled.

Tip

Use the paginate tag to choose how many comments to show at once, up to a limit of 50.

Tip:

Use the paginate tag to choose how many comments to show at once, up to a limit of 50.

Tip: Use the <a href="/docs/api/liquid/tags/paginate">paginate</a> tag to choose how many comments to show at once, up to a limit of 50.

Anchor to
comments_countcomments_count

The number of published comments for the article.

Anchor to
comments_enabled?comments_enabled?

Returns true if comments are enabled. Returns false if not.

Anchor to
contentcontent

The content of the article.

Anchor to
created_atcreated_at

A timestamp for when the article was created.

Tip

Use the date filter to format the timestamp.

Tip:

Use the date filter to format the timestamp.

Tip: Use the <a href="/docs/api/liquid/filters/date"><code>date</code> filter</a> to format the timestamp.

Anchor to
excerptexcerpt

The excerpt of the article.

Anchor to
excerpt_or_contentexcerpt_or_content

Returns the article excerpt if it exists. Returns the article content if no excerpt exists.

Anchor to
handlehandle

The handle of the article.

The ID of the article.

Anchor to
imageimage

The featured image for the article.

Anchor to
metafieldsmetafields

The metafields applied to the article.

Tip

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

Tip:

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

Tip: To learn about how to create metafields, refer to <a href="/apps/metafields/manage">Create and manage metafields</a> or visit the <a href="https://help.shopify.com/manual/metafields">Shopify Help Center</a>.

Anchor to
moderated?moderated?

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

Anchor to
published_atpublished_at

A timestamp for when the article was published.

Tip

Use the date filter to format the timestamp.

Tip:

Use the date filter to format the timestamp.

Tip: Use the <a href="/docs/api/liquid/filters/date"><code>date</code> filter</a> to format the timestamp.

Anchor to
tagstags
array of string

The tags applied to the article.

Anchor to
template_suffixtemplate_suffix

The name of the custom template assigned to the article.

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

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

The title of the article.

Anchor to
updated_atupdated_at

A timestamp for when the article was updated.

Tip

Use the date filter to format the timestamp.

Tip:

Use the date filter to format the timestamp.

Tip: Use the <a href="/docs/api/liquid/filters/date"><code>date</code> filter</a> to format the timestamp.

The relative URL of the article.

The user associated with the author of the article.

{
"author": "Polina Waters",
"comment_post_url": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion/comments",
"comments": [],
"comments_count": 1,
"comments_enabled?": true,
"content": "<p>We've all had this problem before: we peek into the potions vault to determine which potions we are running low on, and the invisibility potion bottle looks completely empty.</p>\n<p>...</p>\n<p> </p>",
"created_at": "2022-04-14 16:56:02 -0400",
"excerpt": "And where to buy <strong>more</strong>!",
"excerpt_or_content": "And where to buy <strong>more</strong>!",
"handle": "potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
"id": 556510085185,
"image": {},
"metafields": {},
"moderated?": true,
"published_at": "2022-04-14 16:56:02 -0400",
"tags": [],
"template_suffix": "",
"title": "How to tell if you're out of invisibility potion",
"updated_at": "2022-06-04 19:27:33 -0400",
"url": {},
"user": {}
}
Example
{
 "author": "Polina Waters",
 "comment_post_url": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion/comments",
 "comments": [],
 "comments_count": 1,
 "comments_enabled?": true,
 "content": "<p>We've all had this problem before: we peek into the potions vault to determine which potions we are running low on, and the invisibility potion bottle looks completely empty.</p>\n<p>...</p>\n<p> </p>",
 "created_at": "2022-04-14 16:56:02 -0400",
 "excerpt": "And where to buy <strong>more</strong>!",
 "excerpt_or_content": "And where to buy <strong>more</strong>!",
 "handle": "potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
 "id": 556510085185,
 "image": {},
 "metafields": {},
 "moderated?": true,
 "published_at": "2022-04-14 16:56:02 -0400",
 "tags": [],
 "template_suffix": "",
 "title": "How to tell if you're out of invisibility potion",
 "updated_at": "2022-06-04 19:27:33 -0400",
 "url": {},
 "user": {}
}
Anchor to

Templates using article

Theme architecturearticle template
Theme architecture
article template
Was this section helpful?