Why JSON-LD is preferred#
Structured data can be written in three formats: JSON-LD, Microdata and RDFa. JSON-LD is the easiest to write and maintain because it doesn’t have to be woven through your HTML — you add one block, and templates or plugins can generate it automatically.
Example: an article with author#
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "How to Set Up Redirects in WordPress",
"datePublished": "2026-03-14",
"dateModified": "2026-10-01",
"author": {
"@type": "Person",
"name": "Iftikhar Qureshi",
"url": "https://iftikhar.in/who-im/"
},
"image": "https://iftikhar.in/wp-content/uploads/redirects.png"
}
</script>
Connecting entities with @id#
Advanced setups use an @graph with @id references so the WebSite, Person, WebPage and Article nodes link to each other instead of repeating details. This theme outputs such a connected graph on every page.
Rules to follow#
- Mark up only information that’s visible on the page.
- Use one plugin or system to output schema — duplicates can conflict.
- Validate with the Rich Results Test and the Schema Markup Validator.
- Watch Search Console’s Enhancements reports for errors after changes.
Related: structured data, rich results, schema markup in WordPress.