Skip to main content

Add a Blog Description with Metafields

Add a custom description section to your blog pages using metafields.

Advanced Tutorial

Verified for the Debut theme only. May require adjustments for other themes.

Step 1: Create the Metafield

In Metafield Studio, create a metafield for your blog. Use the "Copy Liquid code" button to save the generated code snippet.

Step 2: Access the Blog Template

Navigate to Online StoreThemes → select your theme → Edit code → find sections/blog-template.liquid or templates/blog.liquid.

Step 3: Insert the Liquid Code

Add the following code to the blog template:

<div class="custom-blog-description">
{{ blog.metafields.YOUR_NAMESPACE.YOUR_KEY }}
</div>

Replace YOUR_NAMESPACE and YOUR_KEY with the actual namespace and key of your metafield. You can get the exact code from the "Copy Liquid code" button in Metafield Studio.

info

If a blog doesn't have the metafield populated, nothing will render the template won't be affected.