Skip to main content

Overview

Social Cards control how your content appears when shared on Facebook, Twitter, LinkedIn, and other social platforms. GEO AI automatically generates OpenGraph and Twitter Card meta tags with customizable defaults.
Optimized social cards can increase click-through rates by up to 40% on social media.

Supported Platforms

Facebook

Uses OpenGraph protocol for rich link previews

Twitter

Twitter Cards with large image support

LinkedIn

OpenGraph tags for professional sharing

WhatsApp

OpenGraph for messaging previews

Slack

Rich unfurling for team channels

Discord

Embed previews in chat messages

Configuration

1

Access Social Settings

Navigate to Settings → GEO AI → Social
2

Upload Default Image

Click “Select Image from Library” to choose a default OpenGraph image
Recommended size: 1200x630px (1.91:1 ratio)
3

Set Twitter Options

  • Select card type: Summary or Summary Large Image
  • Enter your Twitter handle (e.g., @yoursite)
4

Save Changes

Click Save Changes to activate social meta tags

Implementation Details

Social Meta Handler

includes/class-geoai-social.php
class GeoAI_Social {
    private static $instance = null;

    public static function get_instance() {
        if ( null === self::$instance ) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    private function __construct() {
        add_action( 'wp_head', array( $this, 'output_og_tags' ), 1 );
    }

    public function output_og_tags() {
        if ( ! GeoAI_Compat::get_instance()->should_output_meta() ) {
            return;
        }

        $defaults = get_option( 'geoai_social_defaults', array() );

        if ( is_singular() ) {
            $post_id   = get_the_ID();
            $overrides = get_post_meta( $post_id, '_geoai_social_overrides', true );
            $overrides = is_array( $overrides ) ? $overrides : array();

            $og_title       = $overrides['og_title'] ?? get_the_title();
            $og_description = $overrides['og_desc'] ?? wp_trim_words( get_the_excerpt(), 30 );
            $og_image       = $overrides['og_image'] ?? ( get_the_post_thumbnail_url( $post_id, 'large' ) ?: $defaults['og_image'] ?? '' );
            $og_url         = get_permalink();

            // OpenGraph
            echo '<meta property="og:type" content="article" />' . "\n";
            echo '<meta property="og:title" content="' . esc_attr( $og_title ) . '" />' . "\n";
            echo '<meta property="og:description" content="' . esc_attr( $og_description ) . '" />' . "\n";
            echo '<meta property="og:url" content="' . esc_url( $og_url ) . '" />' . "\n";
            
            if ( $og_image ) {
                echo '<meta property="og:image" content="' . esc_url( $og_image ) . '" />' . "\n";
            }

            // Twitter
            $tw_card = $defaults['tw_card'] ?? 'summary_large_image';
            echo '<meta name="twitter:card" content="' . esc_attr( $tw_card ) . '" />' . "\n";
            echo '<meta name="twitter:title" content="' . esc_attr( $og_title ) . '" />' . "\n";
            echo '<meta name="twitter:description" content="' . esc_attr( $og_description ) . '" />' . "\n";
            
            if ( $og_image ) {
                echo '<meta name="twitter:image" content="' . esc_url( $og_image ) . '" />' . "\n";
            }

            if ( ! empty( $defaults['tw_site'] ) ) {
                echo '<meta name="twitter:site" content="' . esc_attr( $defaults['tw_site'] ) . '" />' . "\n";
            }
        }
    }
}

OpenGraph Tags

GEO AI outputs the following OpenGraph meta tags:
Content type (usually “article” for posts)
<meta property="og:type" content="article" />
Title displayed in social share preview
<meta property="og:title" content="How to Optimize WordPress for AI Search" />
Source priority:
  1. Per-post override
  2. Post title
Description shown below title in preview
<meta property="og:description" content="Learn proven strategies to optimize your WordPress site for AI-powered search engines." />
Source priority:
  1. Per-post override
  2. Post excerpt (trimmed to 30 words)
Canonical URL of the content
<meta property="og:url" content="https://example.com/optimize-wordpress-ai/" />
Preview image shown in social shares
<meta property="og:image" content="https://example.com/wp-content/uploads/2025/03/featured.jpg" />
Source priority:
  1. Per-post override image
  2. Post featured image
  3. Site default OpenGraph image

Twitter Card Tags

Card type (summary or summary_large_image)
<meta name="twitter:card" content="summary_large_image" />
Options:
  • summary: Small square image
  • summary_large_image: Large rectangular image (recommended)
Title (same as og:title)
<meta name="twitter:title" content="How to Optimize WordPress for AI Search" />
Description (same as og:description)
<meta name="twitter:description" content="Learn proven strategies to optimize your WordPress site." />
Image URL (same as og:image)
<meta name="twitter:image" content="https://example.com/wp-content/uploads/featured.jpg" />
Your Twitter handle
<meta name="twitter:site" content="@yoursitename" />
This helps people discover and tag your account when sharing

Image Requirements

Dimensions

1200 x 630 pixelsAspect ratio: 1.91:1

File Size

Under 8MB (ideally under 1MB)Larger files may not load on mobile

Format

JPG or PNGAvoid WebP for maximum compatibility

Content

Include text overlayAdd brand name or key message

Platform-Specific Requirements

PlatformMinimum SizeRecommended SizeMax File Size
Facebook200 x 200px1200 x 630px8 MB
Twitter300 x 157px1200 x 628px5 MB
LinkedIn1200 x 627px1200 x 627px5 MB
WhatsApp300 x 200px1200 x 630px-

Complete Output Example

For a blog post, GEO AI outputs:
<head>
  <!-- OpenGraph Tags -->
  <meta property="og:type" content="article" />
  <meta property="og:title" content="WordPress Performance Optimization Guide" />
  <meta property="og:description" content="Discover 10 proven techniques to reduce WordPress page load time by 50% and improve user experience for better SEO rankings." />
  <meta property="og:url" content="https://example.com/wordpress-performance/" />
  <meta property="og:image" content="https://example.com/wp-content/uploads/2025/03/performance-guide.jpg" />
  
  <!-- Twitter Card Tags -->
  <meta name="twitter:card" content="summary_large_image" />
  <meta name="twitter:title" content="WordPress Performance Optimization Guide" />
  <meta name="twitter:description" content="Discover 10 proven techniques to reduce WordPress page load time by 50% and improve user experience for better SEO rankings." />
  <meta name="twitter:image" content="https://example.com/wp-content/uploads/2025/03/performance-guide.jpg" />
  <meta name="twitter:site" content="@mytechblog" />
</head>

Testing Social Cards

1

Open Sharing Debugger

2

Enter URL

Paste your page URL and click Debug
3

Review Preview

Check how the link preview will appear
4

Scrape Again

Click Scrape Again if you made changes

Best Practices

Design for Mobile

Ensure images and text are readable on small screens. Avoid tiny text in images.

Add Text Overlay

Include your brand name or key message on the image for better recognition.

Use High Contrast

Ensure text stands out against the background for maximum readability.

Keep It Simple

Avoid cluttered designs. One clear message works better than multiple.

Test Colors

Verify colors look good on both light and dark modes (Twitter, Facebook).

Include Branding

Add your logo or site name to build brand recognition.

Per-Post Overrides

Customize social cards for individual posts:
// Set custom OpenGraph overrides for a specific post
$social_overrides = array(
    'og_title' => 'Custom Social Title Different from SEO Title',
    'og_desc'  => 'Custom description optimized for social sharing',
    'og_image' => 'https://example.com/custom-social-image.jpg',
);

update_post_meta( $post_id, '_geoai_social_overrides', $social_overrides );
Per-post overrides are planned for the admin UI in a future update. Currently available programmatically.

Common Issues

Cause: Social platforms cache previewsSolution:
  • Use Facebook Sharing Debugger to “Scrape Again”
  • Clear LinkedIn cache with Post Inspector
  • Wait 24-48 hours for Twitter cache to expire
Check:
  • Image URL is absolute (not relative)
  • Image is publicly accessible (not password protected)
  • Image meets minimum size requirements
  • No robots.txt blocking image access
Check:
  • No other SEO plugin is overriding tags
  • Compatibility mode is configured correctly
  • View page source to verify GEO AI tags are present
Cause: Multiple SEO plugins activeSolution: Enable Coexist Mode in Settings → General

Design Tools

Create professional OpenGraph images:

Canva

Templates for social media graphics (1200x630px)

Figma

Design custom social card templates

Adobe Express

Quick social media image creation

Meta Titles

SEO title and description tags

Schema Markup

Structured data for search engines

AI Audit

Content optimization analysis

Build docs developers (and LLMs) love