Missing Open Graph tags

Open Graph tags (og:title, og:description, og:image) are missing. When your content is shared on social networks, it displays no visual preview.

Why it matters

Posts without a preview image generate up to 3 times less engagement on social networks. The absence of og:image means no image is displayed when sharing.

How to fix

  1. 1

    Via Yoast SEO (automatic)

    Yoast SEO automatically generates OG tags from the title and meta description. Customize image/title/description for each page in the Yoast "Social" tab.

  2. 2

    Set the Open Graph image

    For each post/page: Yoast SEO → "Social" tab → upload a specific 1200×630px image. For the site in general: Yoast → Search Appearance → "Social" tab.

  3. 3

    Manually in functions.php

    php
    add_action('wp_head', function() {
      if (is_singular()) {
        global $post;
        $img = get_the_post_thumbnail_url($post, 'large');
        echo '<meta property="og:title" content="' . esc_attr(get_the_title()) . '">';
        echo '<meta property="og:description" content="' . esc_attr(get_the_excerpt()) . '">';
        if ($img) echo '<meta property="og:image" content="' . esc_url($img) . '">';
        echo '<meta property="og:url" content="' . esc_url(get_permalink()) . '">';
        echo '<meta property="og:type" content="article">';
      }
    });

Ready to fix this issue on your site?

Audit my site for free →