do it like this on your header.php
<html <?php html_tag_schema(); ?> <?php language_attributes(); ?>>
and you need to write the function html_tag_schema() now. write the below function on your active theme's functions.php
function html_tag_schema(){$schema = 'http://schema.org/';// Is single postif(is_single()){ $type = "Article";}// Contact form page IDelse if( is_page(1) ){ $type = 'ContactPage';}// Is author pageelseif( is_author() ){ $type = 'ProfilePage';}// Is search results pageelseif( is_search() ){ $type = 'SearchResultsPage';}// Is of movie post typeelseif(is_singular('movies')){ $type = 'Movie';}// Is of book post typeelseif(is_singular('books')){ $type = 'Book';}else{ $type = 'WebPage';}echo 'itemscope="itemscope" itemtype="' . $schema . $type . '"';}
I hope this one solves your problem