how to add schema.org Markup to wordpress without plugin

Schema when we used to optimize keywords with lots of anchored backlinks, make high keyword density etc.

Now SEO means(Search Engin Optimization) serving better user experience. We have to make our blog semantic so anything to everything can understand it easily.

We can make blogs user friendly with rich contents, proper formatting, easy navigation etc. But what if we need to make it friendly for search engine crawlers?

So here comes schema.

What is Schema.org Markup?
schema plugin



Schema.org provides a collection of schemas that webmasters can use to markup HTML pages in ways recognized by major search providers, and that can also be used for structured data interoperability (e.g. in JSON). Search engines including Bing, Google, Yahoo! and Yandex rely on this markup to improve the display of search results, making it easier for people to find the right Web pages.


First of all Wordpress  we will need to access admin Login

Dashboard - Goto Appearance - > Editor

       1.header.php
       2.index.php
       3.single.php
       4.page.php
       5.sidebar.php
       6.footer.php

First Edit Header.php

Find :
              <body <?php body_class(); ?>>

Replace With :

             <body <?php body_class(); ?> itemscope="itemscope" itemtype="http://schema.org/Services or WebPage">

Find :

              <header id='headersite' class='site-header'>

Replace With :

              <header id="headersite" class="site-header" itemscope="itemscope" itemtype="http://schema.org/WPHeader" role="banner">

Find

<h1 class="site-title">

Replace with:

<h1 class="site-title" itemprop="headline"> //Same keyword All Pages Replace

Find

<h2 class="site-description">

Replace with:

<h2 class="site-description" itemprop="description">  //Same keyword All Pages Replace

Find:

<nav id="site-navigation" class="main-navigation" role="navigation">

Replace with:

<nav id="site-navigation" class="main-navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement" role="navigation">

Editing index.php (Main-index)
Find

<main id="main" class="site-main" role="main">

Replace with:

<main id="main" class="site-main" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">   //Same keyword All Pages Replace

Find

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

Replace with:

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost">      //Same keyword All Pages Replace

Find

<div class="entry-thumb">

Replace with:

<div class="entry-thumb" itemprop="ImageObject">  //Same keyword All Pages Replace

Find

<time class="entry-time published" datetime="<?php the _time('c'); ?>>   //Same keyword All Pages Replace

Replace with :

<time class="entry-time published" datetime="<?php the _time('c'); ?>" itemprop="datePublished">

Find

<span class="author-link">


Replace with:

<span class="author-link" itemscope="itemscope" itemtype="http://schema.org/Person" itemprop="author">



Find

<div class="entry-content">

Replace :

<div class="entry-content" itemprop="text">

Find

<span class="social-network facebook">

Replace with

<span class="social-network facebook" itemprop="sameAs">

Editing single.php

Find

<main id="main" class="site-main" role="main">

Replace with:

<main id="main" class="site-main" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">




how to add schema.org Markup to wordpress without plugin Dev2Tricks 5 of 5
Schema when we used to optimize keywords with lots of anchored backlinks, make high keyword density etc. Now SEO means(Search Engin Optim...

Share this

Related Posts

Previous
Next Post »