RevealTheme logo
Back to Blog

WordPress And Open Graph: The Tags That Matter

WordPress And Open Graph: The Tags That Matter
The RevealTheme Team

By

··Updated May 27, 2026·5 min read

Open Graph (OG) tags are HTML meta tags that control how content appears when shared on social media. When someone shares your URL on Facebook, LinkedIn, Twitter, or messaging apps, the OG tags determine what the preview shows: title, description, image, source.

The OG specification is extensive but only a few tags actually affect engagement. The setup details on those tags matter more than the breadth of tag coverage.

The tags that actually matter

og:title: the headline that appears with the share. Usually matches the page's title tag but can be optimized for social context. Should be compelling and concise (60-100 characters).

og:description: the description below the title. 2-3 sentences that convey what the content is. Should be different from the meta description if the contexts warrant different framing.

og:image: the image shown with the share. 1200x630 pixels is the standard for major platforms. Smaller images get scaled up (looks pixelated); larger images get cropped (may lose important content).

og:url: the canonical URL for the content. Helps when the share is on a tracking-parameter URL but should resolve to the canonical content.

og:type: typically "article" for blog posts, "website" for general pages. Tells social platforms how to format the share.

The Twitter-specific tags

Twitter uses its own variant of OG tags called Twitter Cards. The relevant tags:

twitter:card: usually "summary_large_image" for content with images. Tells Twitter to show the larger card format.

twitter:title: the title for the Twitter share. Often matches og:title but can be tailored for Twitter.

twitter:description: the description for the Twitter share. Often matches og:description.

twitter:image: the image for the Twitter share. Usually matches og:image. Twitter has specific size requirements (1200x675 is recommended).

For most sites, the Twitter tags can simply duplicate the OG tags. Twitter falls back to OG tags when Twitter-specific tags aren't set. The duplication is for explicitness rather than necessity.

The image size details

The 1200x630 standard works well for Facebook, LinkedIn, and most platforms. Twitter prefers 1200x675 for the larger card format.

The practical compromise: use 1200x675 for the OG image. Twitter renders it at its preferred size. Other platforms render it at their preferred size (Facebook will crop slightly to 1.91:1 ratio; the crop is from the edges and usually preserves the main content).

The file size matters. The OG image is what loads when someone shares the URL; large files slow the preview render. A 200-400KB optimized JPEG is appropriate. Don't serve 2MB hero images as OG images.

The implementation in WordPress

WordPress doesn't emit OG tags natively. SEO plugins handle them: Yoast SEO, Rank Math, SEO Press, and others all generate OG tags for each post.

The default behavior: og:title from post title, og:description from meta description or post excerpt, og:image from featured image. These defaults are usually acceptable.

Override per post when the defaults don't fit. In Yoast: the post editor has Social settings where you can set custom OG values for that specific post. Use this for high-visibility content where the social presentation matters more than the default.

The verification

After setup, verify OG tags work correctly:

1. Facebook Sharing Debugger (developers.facebook.com/tools/debug). Enter a URL; Facebook shows what OG tags it detects and how the share will look. If the preview is wrong, fix the tags and click "Scrape Again" to refresh Facebook's cache.

2. Twitter Card Validator (cards-dev.twitter.com/validator). Similar to Facebook's tool but for Twitter Cards.

3. LinkedIn Post Inspector (linkedin.com/post-inspector). LinkedIn has its own preview tool.

These tools also clear the platform's cache for the URL. When you fix OG tags, the platforms might be caching the old values; the debug tools force a refresh.

The common issues

Image not showing: usually a size issue. The image is too small (under 600x315 in old recommendations, under 200x200 absolute minimum) or the image URL isn't accessible to the platform's crawler.

Title or description not what you expected: the OG tags might be set incorrectly. Check the tags via View Source or via the debug tools.

Stale preview when sharing: the platform has cached the old version. Use the debug tool's "Scrape Again" or "Fetch" feature to refresh.

Image cropped badly: the platform applied an unexpected crop. Try a different aspect ratio (some platforms crop differently than others).

The OG image as design opportunity

The OG image is your social media preview. It's seen by everyone who shares the URL, sometimes by more people than read the actual content.

For high-value content (cornerstone articles, major announcements, evergreen pages), invest in the OG image. Custom illustrations, designed text overlays, or photography that communicates the content's value perform better than auto-generated featured images.

Some sites use templated OG images: a consistent design template with the article's title and a topical accent. Tools like OG Image Builder or Bannerbear automate this. The consistency creates brand recognition; the customization makes each share visually specific.

The Twitter Card type variation

Twitter supports multiple card types: summary (smaller card with title, description, small image), summary_large_image (larger card with prominent image), app (mobile app promotion), player (audio/video).

For content sites, summary_large_image is almost always the right choice. It gives the share visual prominence in feeds. The summary type is older and less visually engaging.

The article-specific tags

For articles, additional OG tags provide context:

article:published_time: the publication date

article:modified_time: the last modification date

article:author: the author name (or URL to author profile)

article:section: the category

These don't affect the share preview directly but provide additional metadata that some platforms use for context. Yoast and Rank Math emit them automatically.

The honest framing

OG tags are a small but important detail for content sites that get social shares. The default setup with an SEO plugin is usually adequate for most posts.

The investment that pays off: for high-value content, customize the OG image and possibly the title/description for the social context. The 30 minutes per cornerstone article produces shares that perform better than auto-generated equivalents.

The mistake to avoid: ignoring OG tags entirely. The defaults are usually acceptable but verifying and occasionally optimizing produces measurable engagement improvements. Sites that skip this entirely get worse share previews than they could.

The verification discipline catches misconfigurations early. The debug tools take 2 minutes to use; the value of catching a broken OG image setup before sharing the URL widely is significant.