how to display add faq section on each collection page ?

Hello,

I want to display add faq section on each collection page where admin can add faq’s dynamically.

so i have added below code. now code is working correctly i am able to add faq from backend on collection page, but same faqs data display on all collection pages. every collection page has a diffrent faq data . eg veliche page valiche faq, sparta page sparta faq.


{% schema %}
{
    "name": "FAQ",
    "settings": [],
	  "blocks": [
    {
      "type": "content",
      "name": "Custom content",
      "settings": [
        {
          "type": "html",
          "id": "content",
          "label": "Content",
          "info": "Allow html code"
        }
      ]
    },
    {
      "type": "accordion",
      "name": "Accordion item",
      "settings": [
        {
          "type": "textarea",
          "id": "title",
          "label": "Heading",
          "default": "Question Name"
        },
        {
          "type": "richtext",
          "id": "content",
          "label": "Content",
          "default": "

Answer Content

"
        },
        {
          "type": "checkbox",
          "id": "open",
          "label": "Open Tab By Default",
          "default": false
        }
      ]
    }
  ],
    "presets": [
    {
      "name": "FAQs",
      "blocks": [
        {
          "type": "accordion"
        },
        {
          "type": "accordion"
        },
        {
          "type": "accordion"
        },
        {
          "type": "accordion"
        }
      ]
    }
  ]
}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}

Hi @innois

I guess you need to create template for each collection to have different FAQ section. You can check this to learn how to create a new template

https://help.shopify.com/en/manual/online-store/themes/theme-structure/templates#create-a-new-template

Hi @innois ,

This is David at SalesHunterThemes.

So that every collection page has a different faq data you can create a template collections:

Create a new template collections1. From your Shopify admin, go to Online Store > Themes.

  1. Find the theme that you want to edit, and then click Customize.
  2. Use the Template drop-down menu to select a template. In Collections, Click + Create template.
  3. Give your template a unique name.
  4. Using the Template drop-down menu, select which existing template you want to base your new template on.
  5. Click Create template.

Apply a new template collections1. From your Shopify admin, go to Products > Collections.

  1. Use the search filter to locate the collection that you want to change, or click the collection from the list of existing collections.
  2. In the Online store section, use the drop-down menu to select a new theme template to apply to the selected collection.
  3. Click Save.

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

David | SalesHunterThemes team

HI, @innois Using metafields you can archive this.

Hi @innois , kindly check out the below video:

If my reply is helpful, kindly click like and mark it as an accepted solution.

Thanks!