Mobile app version of vmapp.org
Login or Join
Annie201

: Adding Schema.org’s "WPHeader" with Microdata I'd like to add Schema.org data, and am trying to follow instructions given to me about how to do so. The instructions indicate that I should

@Annie201

Posted in: #Headers #Microdata #SchemaOrg #Seo

I'd like to add Schema.org data, and am trying to follow instructions given to me about how to do so. The instructions indicate that I should change my <header> tag from:

<header>


to

<header itemscope="itemscope" itemtype="http://schema.org/WPHeader">


But is this helpful by itself? It appears to merely add blank data. Am I misunderstanding something? Where do I actually assign values to some of the WPHeader properties that pertain to my specific site? Or does merely adding this blank schema template somehow do something for my site? I don't think the instructions have made that clear, but I may have missed something.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie201

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

Schema.org

I have the impression that many WordPress theme creators add these types. My guess why: These are one of the few types that can be added without knowing the site’s content. The header is the header, no matter what the site about, etc.

But I recommend to omit WebPageElement and its sub-types (currently: SiteNavigationElement, Table, WPAdBlock, WPFooter, WPHeader, WPSideBar).

They are typically useless for webpages, and they can even stand in the way of providing accurate data in RDFa/Microdata.

A few of my related posts, giving more details:


Schema.org issue: The purpose of WebPageElement and mainContentOfPage
Stack Overflow: Why use Schema.org microdata to mark up web page elements?
WordPress Development SE: Wordpress Schema.org Markup. What value does it add?


Microdata

If you only have something like

<header itemscope="itemscope" itemtype="http://schema.org/WPHeader">
</header>


then yes, it doesn’t convey any data, other than "There exists a WPHeader."

If you want to add properties, you have to nest elements and add corresponding itemprop attributes. For example, to specify the name of the WPHeader, it could look like:

<header itemscope="itemscope" itemtype="http://schema.org/WPHeader">
<span itemprop="name">Name of the webpage’s header</span>
</header>


Note that this is not for the name of the webpage! This would go under WebPage. It’s really the name of the header (and in almost all cases, you don’t have a name for a webpage header). Which is one of the reasons why types like these aren’t really useful for normal websites.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme