Json-Ld code for each product page

hello community . i’m currently stuck in one problem is that i have a json- Ld code for faq section i want to add this code on each product page . for my current website i’ll used product template according to product . i’'ll past this json -Ld code on bottom of discription when i and then check each product url on google richtext-result. then there i show error . i’ll try to solve this error but i can’t reslove it please help here i’ll share one example code that create for faq block :
here is error screenshort Screenshot by Lightshot Screenshot by Lightshot

Hi @lata1

This is David from PieLab. I have given the issue a look and it looks like there are 2 snippets FAQ code in your theme. To resolve the issue, you can just delete one of them.

Can you share me your collaborator request code via message so I can delete it for you?

Looking forward to assisting you!

Hi @lata1
Please check if your code is included twice, this may be reason of showing it duplicate
so, if it is inside a snippet then please check if it is included twice and include the schema at a place so that It is included only once

For example, you can place it in main product template at the bottom

Thanks!

Hi @lata1,

Please send the website link, I will check it for you

I’m currently facing an issue with implementing JSON-LD structured data for an FAQ section on my product pages. I’ve created a JSON-LD block for FAQs and added it at the bottom of the product description using my product templates.

My website is: https://loveflowershub.com/

The problem:
When I test the product page URLs using Google’s Rich Results Test, I get errors related to the FAQ structured data. I’ve tried to debug it myself but haven’t been able to fix the issue.

@aliunar I fail to locate your product page properly. Is it available for you to share one example URL for my further check? As when I check the rich result on homepage, it is showing fine.

thanks David now issue will resloved

@pawankumar thank you for taking time for me . now this problem will resolved .

For JSON-LD that works across every product page automatically, you don’t write it per product. You write it once in a Liquid snippet and the dynamic variables fill in each product’s data at page load.

Create a snippet called product-schema.liquid in your theme and add:

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": {{ product.title | json }},
  "image": {{ product.featured_image | image_url: width: 1000 | prepend: 'https:' | json }},
  "description": {{ product.description | strip_html | json }},
  "sku": {{ product.selected_or_first_available_variant.sku | json }},
  "brand": {
    "@type": "Brand",
    "name": {{ product.vendor | json }}
  },
  "offers": {
    "@type": "Offer",
    "price": "{{ product.selected_or_first_available_variant.price | money_without_currency }}",
    "priceCurrency": {{ shop.currency | json }},
    "availability": "https://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}",
    "url": "{{ shop.url }}{{ product.url }}"
  }
}
</script>

Then render it in your product template with {% render ‘product-schema’ %}. Because product.title, product.vendor and the rest are dynamic, the snippet outputs the correct data for whatever product is being viewed, so it covers your whole catalog without touching each product.

Two things people get wrong here: wrap every text value in the json filter so apostrophes and quotes don’t break the markup, and never inject JSON-LD through JavaScript because Googlebot’s first crawl pass skips JS and the schema gets missed. Keep it server-side in Liquid like above.

Test any product URL on Google’s Rich Results Test once it’s live to confirm it parses clean.

Hi, @lata1

Based on your description, I start by looking at how the FAQ schema is being added to the product pages. I’ve seen validation errors happen when JSON-LD is added manually across multiple products, especially if there are small inconsistencies in the markup or duplicate structured data on the page.

Since you’re already using product templates, try adding the FAQ schema directly in the template or through a dedicated FAQ section rather than placing it inside the product description.

That usually results in cleaner output and makes it easier to manage across multiple products.

Also check whether your theme is already generating Product or FAQ schema. If there are multiple schema blocks covering the same content, Google’s Rich Results Test can sometimes flag errors or warnings.

If I were troubleshooting this, I’d first move the JSON-LD out of the product description, then check the page source to make sure only one FAQ schema block is being generated. Those are the first things I’d investigate because they’re among the most common causes of schema validation issues on Shopify stores.

If you’re planning to add FAQ schema across a large number of product pages, you could also explore tools like Rich Snippets By MP to simplify schema management and reduce manual work. It is optional to use.

Disclaimer: I’m affiliated with this tool.