#3982 closed enhancement (fixed)
Add JSON-LD to .org homepage(s)
Reported by: | jonoaldersonwp | Owned by: | obenland |
---|---|---|---|
Milestone: | Priority: | high | |
Component: | General | Keywords: | seo |
Cc: |
Description
Search engines and social platforms increasingly support and desire structured metadata, in the form https://schema.org/ markup, deployed via JSON-LD. Providing information in this format makes us eligable for rich search results, more structured representation, and other benefits.
In the long-term, we should develop a systemised approach to managing the structured data for each page. In the short-term, we can gain some benefits from manually adding static markup to the .org homepage and localised equivalents.
Add the following JSON-LD to all dot org homepages (e.g., wordpress.org and rosetta homepages), as high in the <head>
as is possible.
Code:
<script type='application/ld+json'> { "@context": "https://schema.org", "@graph": [{ "@type" : "Organization", "@id" : "https://wordpress.org/#organization", "url" : "https://wordpress.org/", "name" : "WordPress", "logo" : { "@type" : "ImageObject", "@id" : "https://wordpress.org/#logo", "url" : "https://make.wordpress.org/design/files/2016/09/WordPress-logotype-wmark.png" }, "sameAs" : [ "https://www.facebook.com/WordPress/", "https://twitter.com/WordPress", "https://en.wikipedia.org/wiki/WordPress" ] }, { "@type" : "WebSite", "@id" : "https://wordpress.org/#website", "url" : "https://wordpress.org/", "name" : "WordPress.org", "publisher" : { "@id": "https://wordpress.org/#organization" } }, { "@type" : "WebPage", "@id" : "https://wordpress.org/", "url" : "https://wordpress.org/", "inLanguage" : "en", "name" : "Blog Tool, Publishing Platform, and CMS - WordPress", "description" : "Open source software which you can use to easily create a beautiful website, blog, or app.", "isPartOf" : { "@id": "https://wordpress.org/#website" } }] } </script>
For each rosetta homepage (e.g., es.wordpress.org):
- Replace the
inLanguage
parameter with the appropriate ISO code. - Replace the URL and ID parameters of the
WebSite
andWebPage
nodes (but not of theorganization
node) with appropriate values. - Append the localisation name to the
WebSite
node'sname
attribute (E.g., 'WordPress.org - ES') - If available, replace the
name
anddescription
attributes of theWebPage
node with localised/translated equivalents.
Example for es.wordpress.org
<script type='application/ld+json'> { "@context": "https://schema.org", "@graph": [{ "@type" : "Organization", "@id" : "https://wordpress.org/#organization", "url" : "https://wordpress.org/", "name" : "WordPress", "logo" : { "@type" : "ImageObject", "@id" : "https://wordpress.org/#logo", "url" : "https://make.wordpress.org/design/files/2016/09/WordPress-logotype-wmark.png" }, "sameAs" : [ "https://www.facebook.com/WordPress/", "https://twitter.com/WordPress", "https://en.wikipedia.org/wiki/WordPress" ] }, { "@type" : "WebSite", "@id" : "https://es.wordpress.org/#website", "url" : "https://es.wordpress.org/", "name" : "WordPress.org - ES", "publisher" : { "@id": "https://wordpress.org/#organization" } }, { "@type" : "WebPage", "@id" : "https://es.wordpress.org/", "url" : "https://es.wordpress.org/", "inLanguage" : "es", "name" : "Herramienta de blogs, plataforma de publicación y CMS - WordPress", "description" : "Software de código abierto que puedes usar para crear fácilmente una bonita web, blog o aplicación.", "isPartOf" : { "@id": "https://es.wordpress.org/#website" } }] } </script>
Change History (3)
Note: See
TracTickets for help on using
tickets.
NB: Can test via https://search.google.com/structured-data/testing-tool/u/0/