- Structured data in webflow

Thanks for the detailed explanation of the process. @Siton_Systems

I am trying to add reviews to some of the products but not to all. So I tried to create a CMS text field but this time also add some json code with " s in it.

When the website is published webflow automatically translates " into &quot version.

Is there any workaround for that or this technique can only be used for custom text fields not some parts of the json itself?

@erblis - do not use special characters (like “<” or “{” or ") inside the schema-review field like this and put this as custom code inside JSON script (Google it - not so simple to solve this idea).

This for example " convert to ==> &quot;.

One way is to use a simple number field (Min 0 - max 100) and use this field for the dynamic data.

The idea



Anyway, your schema is missing. It’s hard to solve this by JSON-LD before body.

For list of reviews - You should use microdata because “no way” to add a collection of reviews (more than one object) inside webflow custom code.

Anyway the idea of microdata on WB is more complex (Maybe write me in private).

1 Like

Thanks …
Your explanation very helpful.

1 Like

Thank you @Siton_Systems for the detailed explanation with screenshots.

I’ve managed to utilize custom attribute capabilities of webflow to use microdata.
I’ve get it to work with 0 errors and only 2 warnings /

My recent bottleneck is even I use conditional visibility for the rating section, microdata values still recalled by google structured data testing tool.

I’ve created CMS fields for aggregateRating ratingValue and ratingCount for each product. On the webflow designer, made conditional visibility on when the rating value is empty the div block is hidden. It works on the visual side, but still, google gives error on rating value is empty.

Is there a way to prevent microdata tagged items not to get rendered when they’re hidden?

No way. Google scan the source code (cms if --hidden not remove the element node). It’s ok to put under reviews count the value 0 (of course u won’t get stars under search results).

1 Like

Hey @Siton_Systems really useful post thanks!

I’ve been trying to build custom FAQ schema using dynamic fields, and wanted to only run the schema for pages where I’ve added the CMS content (FAQ).

I have been trying to get this code working, but something is wrong - i don’t suppose you know any JS?!

For a list of items (list of articles, reviews, FAQ, and so on) easier to use microdata (Not JSON-LD) and custom data attributes (Not very complex because you add data-attributes only one time (one item) for the entire list).

** For now, no way to generate JSON list from CMS items (under custom code).

1 Like

Hi all, has anyone been able to successfully setup up Product Schema with product variants in webflow?

I have a problem adding structured data to my Webflow website.
I have a website with recipes and I have to add the ingredients to the structured data.
They need to be all separate and between “”.
So when fill in the ingredients in the text field I created for this the rendered code changes the " for "
Now I could replace this field and make a separate field for each ingredient but there are only 30 fields and the instuctions of the recipe has to be structured the same.
So I don’t have enough fields!
Does anyone have a solution for this problem?



I know I’m reviving an old thread here, but I thought I’d give some info on how to solve the issue @John_Wright posted about above.

Here’s how to add dynamically-generated structured data from within Webflow. Navigate to your template’s custom code, inside < head > tag field. This example adds structured data to my Post CMS model only if it has a Category of Recipe.

{{Category}} = my CMS field called Category

<script type="text/javascript">
if ("{{Category}}" == "Recipes") {
  var s = document.createElement("script");
  s.type = "application/ld+json";
  // escape double-quotes with backslash
  s.innerHTML = "{\"@type\": \"Recipe\", \"name\": \"{{Name}}\"}";
  var head = document.getElementsByTagName("head")[0];

If you want to add certain structured data fields conditionally, simply change how s.innerHTML is constructed.


Thanks for the solution Michael, i’m using a different one: Change JSON schema from CMS (content + type of schema) - #2 by Evan1

And here is how I expand a FAQ schema depending on the number of questions on the page (when you have a FAQ page and keep adding questions to your CMS):


(For some reason my code only shows in edit mode)

1 Like

Hi all!

Quick question, if I update a blog template with structured data, it will update the previously written blogs?

Or do I need to add the data manually one by one?

It’s for a client website, and I need to figure out the time it will take me to add a structured date.

Many thanks!

@Laura_Moreno, yes it should update all pages using the template.

Hello @Siton_Systems ,

In your Update of 2019, it seems you manage to pull Author and Categories from another collection (that is referenced in your post collection).

How do you do that? I have the Author & Category collections that are used in my BLog Post Collection, but I can’t access them in the Custom Code Editor.

Thanks for the help

Hi @QH33, have a look here: Include referenced items from other CMS collection in SEO schema script - #2 by felixz

I struggled with it at first as well.


Hello guys,

One last question, did you find an efficient way of having a clean field for the articleBody element? (meaning, inline without any html balise)

Of course, it’s possible to create a specific field and paste all the article body without HTML markup, but it’s quite long.

Any suggestions would be appreciated.


Hi all and thanks @Siton_Systems for your step-by-step guides and screenshots! So helpful - and I was able to successfully apply to the blog CMS pages of my website by adding JSON-LD to the head tag.

I want to be able to add “Person” schema to our team member pages (CMS) and include a ‘sameAs’ property for each team member (that links to social profiles, etc). The information will be different for each team member - but I don’t have that information populated in any of the existing fields in the CMS (and therefore wouldn’t be able to create custom fields in the head tag). I tried creating JSON-LD for each team member page and embedding the script in the body section - but isn’t detecting any schema.

Do you have any suggestions? Thanks for your help.

Can I see your website, please? You can add Schema on each individual CMS item.

Is this still not automated? For csv rewriting do you need to set up all of the structured data fields on your own?

1 Like

i also wander what seo folks at webflow has to offer, thank u