Automatically add Schema markup to Blogger
Themelites HomeContactAbout
HTML CSS Bootstrap Blogger Template JavaScript PHP

Automatically add Schema markup to Blogger

What is schema markup? 

For those of you who don't know, schema markup refers to the HTML or XML validation that helps the web browser determine the types of elements that a website contains.

What you might not be aware of, however, is just how prevalent and important schema markup actually is.

Schema Markup, founded by Google, Microsoft, Yandex and other search engines at Schema.org

Schema is a kind of microdata. It helps you to increase your SEO score, and stand out from your competitors.

Schema markup creates a rich snippet with your post meta data.

For those of you who aren't familiar with it, let me give you a quick primer: 

Rich snippets are small snippets of code that are added to a webpage as it is being created.

Metadata consists of things like the page title, description, keywords, links, and so on. 

In essence, search engines can tell the relevancy of a web page within a relative set of keywords by looking at this metadata.

Is Schema good for your search engine rankings?

There is no proof of direct effect of microdata on the organic search engine rankings.

But rich snippet can help your posts appear more prominently in Search Engine Ranking Pages (SERP), and it results in better click through rates.

In various studies it is shown that most of the most the search results in Google don't have rich snippet with Schema.org markup.

It provides incredible opportunity to others in order to rank higher in SERPs.

Hence, we can say that Schema increases your SEO score very quickly.

What Is Schema Used For?

  • Articles
  • Blog Posts
  • Reviews
  • Products
  • Recipes
  • Events
  • Videos and much more

Above categories are most famous uses of Schema.

To use schema in your post you have to associate the data with itemscope, itemtype, and itemprop.

How Does Schema Added To Your Webpages?

Before begining to add schema, you need to figure out the item type of the content of your webpage.

For instance, it may be a sales report or food recipe or any product review.

Now after determine the item type you can start tagging the elements.

For instance, if you were making a sales report, you would start tagging items like "product detail", "unit price", "start date" etc... In the head section of your report.

<div>
<h1>Laptop Mart</h1>
<h2>XYZ Laptop</h2>
<p>Description:</p>
<p>High end laptop</p>
<p>Price:</p>
<p>Rs. 30,000</p>
</div>

Now we have to add tags to the code so that it can describe your webpage to search engine bots or web crawlers.

In the above example, replace div with:

<div itemscope >

By stating itemscope in div, we are declaring that the content in the div is identifying the specific item.

Next step is to specify the item type of the data of our webpage. In our example it is product. So the above div tag will look like.

<div itemscope itemtype="http://schema.org/product" >

Item type is in the form of a URL. 

Now we will be tagging the part of webpage which contains the name of the company. In our example it is in the h1 tag.

We can do so by using the itemprop attribute which describes the property of an item.

<div itemscope itemtype="http://schema.org/product" >

Similarly we can describe the item property of other elements like description, price, etc.

In Wordpress we can do all these things automatically by various plugins but in Blogger we have to do it manually.

Wait don't loose hope

 Here is something that can help you in doing it automatically in Blogger.

Dynamically Add Schema Markup In Blogger Posts

Step 1: Go to Edit HTML

Step-1

Step 2:  Search <b:includable id='shareButtons' var='post'>


Step 3: Now below it paste the code given below

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "<data:view.url.canonical/>"
  },
  "name": "<data:view.title.escaped/>",
  "headline": "<data:view.title.escaped/>",
  "description": "<data:post.snippet/>",
  "image": " <b:if cond = 'data:post.thumbnailUrl'><data:post.thumbnailUrl/><b:else/>Default Image URL</b:if>",  
  "author": {
    "@type": "Person",
    "name": "<data:post.author/>"
  },  
  "publisher": {
    "@type": "Organization",
    "name": "themelites.com",
    "logo": {
      "@type": "ImageObject",
      "url": "Organization or Publisher Image Url  "
    }
  },
  "datePublished": "<data:post.timestamp/>",
  "dateModified": "<data:post.timestamp/>"
}  
</script>

Please add your image URLs and change the publisher name, type of your post "ARTICLE" according to you.

If you like our work please give us a credit link.

Back to top