Hello everyone, I would like to make my Json-LD
code automatic.
That is to say that instead of rewriting it for all the products 1 by 1, I would like them to do the job for all of them.
The code is for structured data from google/Rich Snippets.
Here is the code I’m using for now:
{% if product.handle contains “The product name after the section: product/Product name” %}
I would like to put a single code that would say what to do, a template/mode of use in fact.
I know it’s not very clear unfortunately.
Thank you for your help!
If you want to add JSON-LD to all of your pages automatically, you can give a try to our SEO Booster app. With just one click, we will help you add JSON-LD code (also with all the schema code you need like price, reviews, etc.).
I already have the code, the problem is that I have to write the code for each of my products and update it etc…
I would love to have a code that automates this.
Hi, try using the code below instead of your code to automatically add schema markup to all of your product pages.
I recommend adding a new snippet, name it something like “product-schema.liquid” to store the code above and paste {% include ‘product-schema’ %} to your product-template.liquid so that you can find it (and customize it) more easily later.
Shopify Schema Markup for Reviews Widget can be quite challenging (because it depends on the review apps that you’re using), I recommend you leave it to the experts.
Luckily, we are currently offering free SEO projects. Kindly check this link for more information about the free project (which also include adding schema markup to your store). There are limited slots so you might want to sign-up fast.
Hey @TopBit
Most updated themes have basic structured data that is dynamic already though often are missing optional fields that Google wants to see. Reviews data should be provided by your review provider.
You can code this yourself, but then have to maintain the code going forward. That’s why an app is often the better route as we keep up with Google’s changes.
JSON-LD for SEO is a single, one-time charge and completely devoted to providing the proper schema for your site. Because it’s meant to replace the work needed by an experienced web developer, charging you a one-time fee makes the most sense. That way you pay it once, just like if you hired someone for several hours to do the same.
JSON-LD for SEO integrates with over 20 review providers so depending on who you use, we may be able to help.
Feel free to contact me at support@ilanadavis.com or provide your URL here and I can let you know if the app would be helpful.
For anyone still looking for a working answer on this — the way to make it fully dynamic across all your products without touching each one manually is through a Liquid snippet.
Create a new snippet in your theme called product-schema.liquid and add this:
Then in your product.json template or product.liquid just include it with {% render 'product-schema' %}. That’s it — one snippet, works across every single product automatically.