Hello, i am trying to add google faq markup schema, in which file i should put it in page.liquid or page.json? And do i need to remove any code or just put it at the end. Thank you.
Topic summary
Where to place Google FAQ structured data (schema) in a Shopify theme.
-
Recommended placements depend on scope: product.liquid for product pages; a specific page template (page-name.liquid) for individual pages; theme.liquid if you want it to load sitewide (global).
-
An alternative approach is to create a dedicated snippet (e.g., in a “schema” or “microdata” folder) and include it with Liquid conditionals to control where it renders, such as request.page_type == ‘product’ or page.handle == ‘faq’. This keeps all structured data organized and prevents unwanted global output.
-
FAQ markup schema refers to structured data (e.g., JSON-LD or microdata) that helps Google display rich results. Shopify uses Liquid templates and snippets to insert such code.
-
No guidance was given to remove existing code; advice focused on placement and scoping.
-
Latest update: a participant asked whether the snippet method makes the schema global; the suggested use of Liquid conditionals is intended to limit it to a single page. Confirmation was not provided.
Status: Ongoing; no final resolution. Suggested action is to use a snippet with precise Liquid conditions if the goal is to show FAQ schema on only one page.
Hi @Mihai10
This is Richard from PageFly - Shopify Page Builder App
Where to put the code schema is depend on your schema type.
If its for product, you can add it in product.liquid, for pages, you can add it in the page (page-name.liquid)
Or if you are not sure about it, you can place it in the end of theme.liquid ( put it here all pages will load that schema )
Hope this can help you solve the issue
Best regards,
Richard | PageFly
Hello, @Mihai10
I recommend you create a separate snippet for all your structured data. Go to the snippets and create the folder called “schema” or “microdata”.
I would recommend you include all the Schemas from your website in this folder, using the liquid commands, for example:
{% if request.page_type == 'product' %}
This way, you can comfortably organize your microdata and use the commands to specify the schema for every page. In your case - FAQ.
{% if page.handle == 'faq' %}
If you are uncomfortable with the custom coding - I can do it for you.
Best regards,
Max
@max_bokatuev does this make the schema global? ideally we want it on only 1 page.