: Is it correct to replace a general schema.org item with a more specific sub item I've recently been looking at the schema vocab for describing the layout of a webpage. The easiest and most
I've recently been looking at the schema vocab for describing the layout of a webpage.
The easiest and most obvious item to implement is the WebPage tag.
If you're just assigning schema.org/WebPage to a page, then adding it to the body tag makes sense.
However suppose your page is a search results page or a profile page, there are two relevent WebPage sub types for those cases:
schema.org/ProfilePage schema.org/SearchResultsPage
My instinct is that you'd replace WebPage with the correct sub category in the body tag, however often when I come across implementations of this, for example the following theme, it recommends putting the sub categories separately inside the webpage object.
Is this correct, or should you replace a more general item with a more specific one when you can?
More posts by @Gloria169
1 Comments
Sorted by latest first Latest Oldest Best
If your web page is a search results page, simply use SearchResultsPage instead of WebPage.
It’s a hierarchy. Each child inherits from all its ancestors. So a SearchResultsPage is a more specific WebPage, which is a more specific CreativeWork, which is a more specific Thing.
Always go with the most specific type that applies to your case. On a type’s page, the more specific types are linked in the bottom under the "More specific Types" section.
If your web page is both, a search results page and a profile page (which is rather unlikely … even if the profile shows all the author’s posts, it’s not really a search, is it?), use both types, ProfilePage and SearchResultsPage.
putting the sub categories separately inside the webpage object
It depends on how exactly the "sub" items are specified.
If they are added with a property, they are related to the parent item (and the property specifies the kind of relationship).
If they are not added with a property, they have no relation, each item is on its own.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.