SimplaCMS Google structured data markup

14-12-2021 - 1 minute, 35 seconds -

index.tpl

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "name": "Site name",
  "alternateName": "Company name",
  "url": "http://domain.com",
  "description": "Site description"  
}
</script>
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "url": "http://domain.com",
  "name": "Company name",
  "logo": "http://domain.com/design/YourTemplateFolder/images/logo.png",
  "contactPoint": [
  {
    "@type": "ContactPoint",
    "name": "John Doe",
    "telephone": "+380 11-111-11-11",
    "contactType": "customer service",
    "email": "seller@domain.com",
    "availableLanguage": "EN", // site language
    "areaServed" : "UA" // your site/store location EN, RU, BY, UA ΠΈ Ρ‚.Π΄.
  },{
    "@type": "ContactPoint",
    "name": "Jane Doe",
    "telephone": "+380 22-222-22-22",
    "contactType": "customer service",
    "email": "seller@domain.com",
    "availableLanguage": "EN", // site language
    "areaServed" : "UA" // your site/store location EN, RU, BY, UA e.t.c.
  },{
    "@type": "ContactPoint",
    "name": "Jake Doe",
    "telephone": "+380 33-333-33-33",
    "contactType": "customer service",
    "email": "seller@domain.com",
    "availableLanguage": "EN", // site language
    "areaServed" : "UA" // your site/store location RU, BY, UA e.t.c.
  }],
  "description": "Site description",
  "address": {
  "@type": "PostalAddress",
  "addressLocality": "Kyiv, Ukraine" // Π“ΠΎΡ€ΠΎΠ΄, страна
    }
}
</script>

product.tpl

<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": "{/literal}{$product->name}{literal}",
  "image": "{/literal}{$product->image->filename|resize:800:600:w}{literal}",
  "description": "{/literal}{$product->description}{literal}",
  "mpn": "{/literal}{$product->variant->sku}{literal}",
  "brand": {
    "@type": "Brand",
    "name": "{/literal}{$product->brand->name}{literal}"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.4", // If the site has a rating of goods, then you can display it here "{/literal}{$product->rate}{literal}"
    "reviewCount": "89" // the same with the number of votes 
  },
  "offers": {
    "@type": "Offer",
    "priceCurrency": "UAH", //Currency
    "price": "{/literal}{$product->variant->price}{literal}",
    "priceValidUntil": "{/literal}{$smarty.now|date_format:"%Y-%m-%d"}{literal}",
    "itemCondition": "http://schema.org/UsedCondition",
    "availability": "http://schema.org/InStock",
    "seller": {
      "@type": "Organization",
      "name": "Site name"
    }
  }
}
</script>

post.tpl

<script type="application/ld+json"> 
{ 
"@context" : "http://schema.org", 
"@type" : "Article", 
"name" : "{/literal}{$post->name}{literal}", 
"author" : { "@type" : "Person", "name" : "Author or theme name" }, 
"headline" : "{/literal}{$post->name}{literal}",
"datePublished" : "{/literal}{$post->date}{literal}",
"mainEntityOfPage": {"@type": "WebPage", "@id": "http://domain.com/blog"},
"dateModified" : "{/literal}{$post->date}{literal}",
"image" : "http://domain.com/files/posts/{/literal}{$post->image}{literal}", 
"articleBody" : "{/literal}{$post->annotation}{literal}",
"url" : "{/literal}{$post->url}{literal}",
"publisher" : { "@type" : "Organization", "name" : "Site name", "logo" : "http://domain.com/design/YourTemplateFolder/images/logo.png" }
}
</script>

Put all code in

{literal}......{/literal}

Review all values, such as Site name, domain, template, etc., and replace with the ones you need.