WordPress.org

Making WordPress.org

Opened 7 months ago

Last modified 6 months ago

#4280 accepted defect

Add schema markup to profile templates

Reported by: jonoaldersonwp Owned by: 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 (7)

#1 @jonoaldersonwp
7 months ago

  • Description modified (diff)

#2 @jonoaldersonwp
7 months ago

  • Description modified (diff)

#3 @jonoaldersonwp
7 months ago

  • Description modified (diff)

#4 @coffee2code
7 months ago

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

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


6 months ago

#6 @jonoaldersonwp
6 months ago

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

#7 @jonoaldersonwp
6 months ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.