: Schema.org - Microdata and JSON-LD behave diffrently for same code Having a hard time with JSON-DL and several blogPost. The way I see it, both Microdata one and JSON-DL one is exactly the
Having a hard time with JSON-DL and several blogPost. The way I see it, both Microdata one and JSON-DL one is exactly the same, yet the latter only show one blogPost, where Microdata show both.
HTML Microdata Markup:
<body itemscope itemtype="https://schema.org/Blog">
<header>...</header>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<h1 itemprop="headline">Article Heading One</h1>
</article>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<h1 itemprop="headline">Article Heading Two</h1>
</article>
</body>
JSON-DL Markup:
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"Blog",
"blogPost":{
"@type":"blogPosting",
"headline":"Article Heading One"
},
"blogPost":{
"@type":"blogPosting",
"headline":"Article Heading Two"
}
}
</script>
Copy here to test: search.google.com/structured-data/testing-tool/u/0/
Anyone see whats wrong?
More posts by @Vandalay111
1 Comments
Sorted by latest first Latest Oldest Best
Typcal... Tried several different methods for hours, and a few minutes after I ask here, I fix it myself...
Anyway, correct code for getting several blogPosts is this:
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"Blog",
"blogPosts":
[
{
"@type":"blogPosting",
"headline":"Article Heading One"
},
{
"@type":"blogPosting",
"headline":"Article Heading Two"
}
]
}
</script>
Will use it to markup every blog like a index site, guess that is what Its for :)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.