preloader

WordPress Social Sharing: Open Graph, Twitter Cards, and WhatsApp Previews

Social link previews are controlled by different meta tag standards depending on which platform you are sharing to. Understanding which tags each platform reads helps you configure Open Graph and related settings correctly in WordPress.

The Open Graph Protocol

Open Graph was developed by Facebook and is now the standard used by most platforms for link preview metadata. The core tags are:

  • og:title — The title shown in the link preview (can differ from the page title).
  • og:description — The description text in the preview.
  • og:image — The image shown in the preview. Minimum 1200x630px for best display across platforms.
  • og:url — The canonical URL for this content.
  • og:type — Content type (website, article, product, etc.).

Facebook, LinkedIn, Pinterest, Slack, Discord, and most chat apps read og: tags.

Twitter Cards

Twitter (X) has its own meta tag standard that gives additional control over how links display in tweets. Key Twitter Card tags:

  • twitter:card — The card type. summary_large_image shows a large hero image (most common). summary shows a small thumbnail.
  • twitter:title — Title for the Twitter preview (can differ from og:title).
  • twitter:description — Description for the Twitter preview.
  • twitter:image — Image for the Twitter preview.

Twitter falls back to og: tags if twitter: tags are absent, so having good og: tags covers Twitter in most cases. Add explicit twitter: tags when you want different content in Twitter previews versus other platforms.

WhatsApp Link Previews

WhatsApp reads og: tags to generate link previews. The og:image must be publicly accessible (no authentication required), under 300KB for reliable display, and at least 300x200px. WhatsApp crops images to a square or near-square aspect ratio in some display contexts. Test WhatsApp previews by sending the link to yourself in WhatsApp and checking the preview on mobile.

Configuring in Rank Math

Go to Rank Math, then General Settings, then Social Metadata. Enable Open Graph and Twitter Cards. Under Titles and Meta, then Posts (or the relevant content type), go to the Social tab to set default social image and title templates. Per-post, use the Social tab in the Rank Math meta box to set custom title, description, and image for that specific piece of content.

Configuring in Yoast SEO

Go to Yoast SEO, then Social. Enable Facebook (Open Graph) and Twitter. Set default images. Per-post, the Yoast meta box includes a Social tab with fields for Facebook and Twitter title, description, and image separately.

Image Size Recommendations

Use a single image size that works across all platforms:

  • Dimensions: 1200 x 630 pixels
  • Aspect ratio: 1.91:1
  • Format: JPEG or PNG
  • File size: Under 1MB (smaller is better for WhatsApp)
  • Content: Keep important visual elements away from the edges as some platforms crop

Create a standard template for social images that can be quickly populated for each piece of content. Tools like Canva have 1200x630px social image templates built in.

For social metadata setup, custom Open Graph templates, and social sharing button configuration across a WordPress site, a WordPress developer can implement a complete social sharing strategy.

Keep Reading

Previous Post How to Fix Facebook and LinkedIn Link Previews on WordPress Next Post How to Get More WooCommerce Product Reviews: A Practical Guide

Need Help With Your WordPress Site?

If you need help with WordPress fixes, plugin issues, theme customization, or development work, feel free to get in touch.

Get a Free Estimate