Opened 7 years ago
Closed 3 years ago
#4280 closed defect (bug) (fixed)
Add schema markup to profile templates
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Component: | Profiles | Keywords: | seo |
| Cc: |
Description (last modified by )
The following code should be adapted and added to profile templates (values from https://profiles.wordpress.org/jonoaldersonwp/ used for reference).
<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://s.w.org/style/images/about/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":"ProfilePage",
"@id":"https://profiles.wordpress.org/jonoaldersonwp/#webpage",
"url":"https://profiles.wordpress.org/jonoaldersonwp/",
"inLanguage":"en",
"name":"{{Page title}}",
"description":"{{Meta description}}",
"isPartOf":{
"@id":"https://wordpress.org/#website"
}
},
{
"@type":"Person",
"@id":"https://profiles.wordpress.org/jonoaldersonwp/#profile",
"name":"Jono Alderson",
"image":"https://secure.gravatar.com/avatar/beed0f5ca54ae221655b9f30a1f6fe66?s=200&d=mm&r=g",
"jobTitle":"Special Ops",
"worksFor": {
"@type":"Organization",
"name":"Yoast"
},
"sameAs": [
"https://www.facebook.com/jonathan.alderson",
"https://www.linkedin.com/in/jonoalderson/",
"https://twitter.com/jonoalderson"
],
"mainEntityOfPage": { "@id" : "https://profiles.wordpress.org/jonoaldersonwp/#webpage" }
}
]
}
</script>
NOTE: Optional nodes (like worksFor) should only be included when the relevant profile fields are populated.
NOTE: https://meta.trac.wordpress.org/ticket/4277 changes the title and description contents; values here should also change and use the new values specified in #4277.
NOTE: https://meta.trac.wordpress.org/ticket/4278 is required to retrieve/set social profiles in the sameAs array.
NOTE: If name is not set, fall back to username.
Change History (10)
Note: See
TracTickets for help on using
tickets.
Ah, I need to change+update the syntax on this; will do so now.