Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#3940 closed enhancement (fixed) homepage should include open graph + twitter tags

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by: dd32's profile dd32
Milestone: Priority: low
Component: General Keywords: seo


We should aim to best control how WordPress is represented when shared on social platforms. Without open graph tags, we're at the whim of how Facebook etc decide to parse and present our messaging.

This has lead to significant issues in the past where, e.g., an ill-fitting WordCamp promotional image has been sourced as the primary image to represent the page/product/brand.

Add the following tags to the <head>.

<meta property="og:type" content="website" />
<meta property="og:title" content="Blog Tool, Publishing Platform, and CMS - WordPress" />
<meta property="og:description" content="Open source software which you can use to easily create a beautiful website, blog, or app. " />
<meta property="og:url" content="" />
<meta property="og:site_name" content="WordPress" />
<meta property="og:image" content="" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:creator" content="@WordPress" />

Note that, the description and image can (and probably should) be refined by the marketing team - but this shouldn't hold up deployment.

Change History (6)

#1 @jonoaldersonwp
6 years ago

For the sake of clarity, this is a quick fix, and a bit of a fudge. Ideally, we'd have a combination of default logic and specific controls to manage og tags and similar (including additional tags which I've not included here), on every single url on the site(s).

This is an mvp, quick win; not a complete or long-term solution.

#2 @dd32
6 years ago

What domains and paths is this intended to cover? I'm assuming only

Can you also provide an updated list of what we should have on rosetta domains? ie.

$ curl -s | grep -e '\(twitter\|og\):'

<meta property="og:type" content="website" />
<meta property="og:title" content="Deutsch" />
<meta property="og:description" content="WordPress auf Deutsch" />
<meta property="og:url" content="" />
<meta property="og:site_name" content="Deutsch" />
<meta property="og:image" content="" />
<meta property="og:locale" content="de_DE" />
<meta name="twitter:site" content="@WordPress" />
<meta name="twitter:text:title" content="Startseite" />
<meta name="twitter:card" content="summary" />

(I believe these may be added by a certain popular plugin, but we can change the data)

Last edited 6 years ago by dd32 (previous) (diff)

#3 @dd32
6 years ago

The tags from the ticket have been added in [dotorg-14595]. Leaving open for refinement.

#4 @jonoaldersonwp
6 years ago

Code was only intended for the homepage.

For Rosetta domain homepages, I would make some minor tweaks:

  • Append - CC to the og:site_name (e.g., WordPress - DE).
  • Translate the English og:description and og:title (with some sensible compromises where necessary).
  • Set the URL to the appropriate homepage.
  • Set the og:locale as appropriate (eg., de_DE).
  • Alter the image to a translated/localised version, if available.

Note that JetPack appears to be active and outputting og tags on these sites, but that they're painfully wrong. We should disable/overwrite/correct those values on homepage of those sites.

Last edited 6 years ago by jonoaldersonwp (previous) (diff)

#5 @dd32
6 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 7900: Main: Rosetta: Define the og: and twitter: metadata for rosetta sites to match those of

This fixes the rather incomplete and incorrect data generated from the placeholder front-page.

Fixes #3940.

#6 @joostdevalk
5 years ago

  • Keywords seo added
Note: See TracTickets for help on using tickets.