What file/section do I paste my product schema inside the Shopify code editor?

Topic summary

Main issue: Where to add product schema (structured data/JSON-LD) so it applies to every product page in a Shopify theme.

Key points:

  • The poster wants to paste product schema across all product pages and asks which file to use in the Shopify code editor (Layouts, Templates, Sections, Snippets). A screenshot of the editor is referenced.
  • It’s noted that most Shopify themes already include product schema by default. A store URL was requested for verification.

Guidance given:

  • First suggestion: check product.liquid (commonly used for product templates) for existing schema.
  • The poster does not have product.liquid but has main-product.liquid under Sections (typical for Online Store 2.0 themes).
  • Final direction: edit main-product.liquid and locate the block; add or adjust the product schema there to affect all product pages.

Outcome/status:

  • Practical answer provided (use main-product.liquid’s JSON-LD block). No conflicting viewpoints. Appears resolved; no further action recorded.
Summarized with AI on December 23. AI used: gpt-5.

There are a bunch of options inside the Shopify code editor dashboard:
Layouts, templates, sections, snippets, etc. Do I need to create a new file with a certain name and paste individual product snippets there?

Hy @marketingwiz ,

what exactly you want to achieve.

Hi @marketingwiz

I’m Dan from Ryviu: Product Reviews & QA app.

Could you send me your store URL to check? Because usually, every Shopify contains product schema code by default.

I wanna add product schema for every product page on my Shopify store. As I can see on the source code pages of my products, there’s already some schema code in there. The question remains, what file in the code editor dashboard do I paste the schema code in?

https://admin.shopify.com/store/nutratology

if you check the product.liquid file you will find it

I don’t have the file (product.liquid). Instead, I have main-product.liquid under “Sections”.

Did you found the products.liquid ?

Hi @marketingwiz

You can find that code in main-product.liquid file, under line of code