Jump to content
godweb

Structured data with JSON-LD

Recommended Posts

godweb

Hi,

some time ago I asked for the intagration of Google Structured Data component to get structured data in JSON-LD instead of through microdata.

I have seen that it's not necessary because it's possible to dynamically populate the JSON-LD scripts through the Jreviews custom fields.

Trivially, I put this code in a banner field:

<script type="application/ld+json">
{
  "@context": "https://schema.org/", 
  "@type": "Product", 
  "name": "{jr_nameproduct}",
  "image": "{image}",
  "description": "{summary}",
  "offers": {
    "@type": "Offer",
    "url": "",
    "priceCurrency": "GBP",
    "price": "{jr_price}",
    "availability": "https://schema.org/OnlineOnly"
  }
}
</script>

It works well, apart from the warnings for missing information, including the image and the description because {image} and {summary} don't work: is there any way to get these values?

Similarly, is there any way to call the values for ratingValue and reviewCount?

If there is this possibility, it would be an excellent and very easy solution to use JSON-LD without other components than Jreviews.

Thank you

Share this post


Link to post
Alejandro

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post
godweb

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post
godweb

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.