Structured schema for recipe based articles

Hi,

I have different sets of articles (general, recipe, reviews etc) where I want the structured data to be different for different types. For recipe I want an entirely different schema.

Right now I have schema in page HTML Header section of the editor, Is there a way to update this section dynamically? Not just the data within the page HTML Header but I want the entire data to be different. (mainly because I need to store review and rating information in recipe based articles which are not necessary for general articles).
I did not get any option to update this in the conditionals tab.

I am thinking of having a separate page only for recipe based articles, Is this the right approach?

NO

Use the formatted as text operator for your page HTML Header section on the page where you currently have your structured data.

Maybe do something like ‘current page blog article type is recipe:formatted as text’ and in the yes section put structured data for recipe types, then in no section do another formatted as text operator like ‘current page blog article type is reviews:formatted as text’ etc.

Note, this approach works fine for going about two layers deep, so you may experience issues if you were to do it 3 times or so…you can also do this with the structured data itself. For example, if my product does not have any reviews, I can not send in the same structured data for products with reviews, because if I send in the structured data inclusive of reviews section, and the product has no reviews on page, google knows this and the structured data is seen as not valid…so I do 'current page product review count > 0 : formatted as text with yes being structured data for reviews and no being empty.

1 Like

Thanks for the reply, I think this approach is better. Btw what are the disadvantages using a separate page just for recipes? I’ll be copying the page and just changing the schema

Having the separate page when it is not necessary in my opinion. It might work better for you and your use case, but in my apps, I avoid unnecessary pages, navigation and workload units for page load.

In my app, I have one page for blog, which shows all blog articles, and when a user selects one, they stay on the same page. I have all of this tied together with structured data and all on page SEO and it works well for my use case.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.