[wp-meta] [Making WordPress.org] #4280: Add schema markup to profile templates

Making WordPress.org noreply at wordpress.org
Fri May 3 09:13:07 UTC 2019


#4280: Add schema markup to profile templates
----------------------------+--------------------------
 Reporter:  jonoaldersonwp  |       Owner:  coffee2code
     Type:  defect          |      Status:  accepted
 Priority:  normal          |   Milestone:
Component:  Profiles        |  Resolution:
 Keywords:  seo             |
----------------------------+--------------------------
Description changed by jonoaldersonwp:

Old description:

> 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":["WebPage","ProfilePage"],
>             "@id":"https://profiles.wordpress.org/jonoaldersonwp/",
>             "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/" }
>         }
>     ]
> }
> </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`.

New description:

 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`.

--

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/4280#comment:7>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list