Shopify themes, liquid, logos, and UX
Trying to add collapsible block to my blog posts. I need them to different for each blog post. (Dawn Theme)
Solved! Go to the solution
This is an accepted solution.
Hi @Boomdeleon , you will need to create a new template for each blog post in order for the collapsable content to be unique per page.
Step 1: Go to theme editor
Step 2: Select Blog Posts in drop down
Step 3: Create template
Step 4: Go to blog post and apply that template.
Step 5: Go back to Theme editor > blog posts > select your newly created template & edit it
Step 6: Repeat for each blog post.
Let me know if you have any questions.
This is an accepted solution.
Hi @Boomdeleon , you will need to create a new template for each blog post in order for the collapsable content to be unique per page.
Step 1: Go to theme editor
Step 2: Select Blog Posts in drop down
Step 3: Create template
Step 4: Go to blog post and apply that template.
Step 5: Go back to Theme editor > blog posts > select your newly created template & edit it
Step 6: Repeat for each blog post.
Let me know if you have any questions.
That's going to be a lot of templates. I write several blogs a week. Is there a way to write it in the code?
Or you choose either of this 3 options:
Option 1: Using Metafields (Recommended)
Shopify metafields allow adding custom content (like unique FAQ sections) to each blog post.
Create a metafield in Shopify for blog posts.
Add unique FAQ content to each blog post through the metafield.
Modify the blog post template in the Dawn theme to display this custom content.
Option 2: Creating a Custom Blog Post Template
Instead of using one default blog template, they can:
Duplicate the blog post template in Dawn.
Modify each template with different collapsible blocks.
Assign different templates to different blog posts.
Option 3: Using Custom Code in Liquid
Modify the blog post template (blog-post.liquid) and use:
Conditional Liquid logic ({% if %}) to display different content based on the blog post.
JSON data or metafields to pull unique FAQ content.
To add a different collapsible FAQ section to each blog post in the Dawn theme, follow these steps:
1. Enable Collapsible Blocks in Blog Posts
Since Shopify’s default blog template applies the same content across all blog posts, you’ll need to create a custom metafield for FAQs.
2. Create a Metafield for FAQ Content
Go to Shopify Admin > Settings > Custom Data > Blogs (or "Metafields").
Click "Add definition" and name it something like faq_content.
Choose "Type: Rich text" or "Multi-line text" (for better formatting).
Save it.
3. Add Collapsible Section to Your Blog Template
Go to Online Store > Themes > Dawn > Customize.
Open Blog posts template.
Click “Add Section” > Collapsible Content.
In the text box, insert:
{{ blog.metafields.custom.faq_content }}
Save your changes.
4. Add Unique FAQ Content to Each Blog Post
Edit any blog post.
Scroll to the Metafields section at the bottom.
Enter your custom FAQ content for that blog post.
Save & check your blog post—it will now show a unique FAQ section!
Would you like help styling the collapsible block for better design?
this does not work
Try this then:
Instead of using blog.metafields, you need to set metafields for each individual blog post, not the entire blog.
Now, edit the blog post template to dynamically show the FAQs.
????
does not work
@Boomdeleon , The templates is a simplier way to achieve this. The solutions are laid out above, you can decide which is the best suited for you. Goodluck
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025