Making WordPress.org

Opened 5 years ago

Closed 13 months ago

#4280 closed defect (bug) (fixed)

Add schema markup to profile templates

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Profiles Keywords: seo
Cc:

Description (last modified by jonoaldersonwp)

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&#038;d=mm&#038;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)

#1 @jonoaldersonwp
5 years ago

  • Description modified (diff)

#2 @jonoaldersonwp
5 years ago

  • Description modified (diff)

#3 @jonoaldersonwp
5 years ago

  • Description modified (diff)

#4 @coffee2code
5 years ago

  • Owner set to coffee2code
  • Status changed from new to accepted

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


5 years ago

#6 @jonoaldersonwp
5 years ago

Ah, I need to change+update the syntax on this; will do so now.

#7 @jonoaldersonwp
5 years ago

  • Description modified (diff)

#8 @coffee2code
3 years ago

Mostly implemented in [17440-dotorg].

Implements everything requested except for the 'sameAs' section that lists social media accounts of 'Person', which requires #4278.

#9 @jonoaldersonwp
3 years ago

Ooooh, wow! Thanks!

#10 @jonoaldersonwp
13 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Closing, as the social accounts are no longer output on the page.

Note: See TracTickets for help on using tickets.