WP Facebook Open Graph protocol
No meta description with Yoast WordPress SEO plugin (5 posts)

  1. colouro
    Posted 3 years ago #

    Yoast WordPress SEO adds the description tag, but WPFOG does not add og:description.

    My problem is that I do not use any excerpt or post content. My posts are only from custom fields.

    Maybe someone knows the solution?


  2. colouro
    Posted 3 years ago #

    If anyone wants to know how to get around this problem, so I did the following:

    Line 130: replaced the "is_singular()" to "!is_page()"
    Line 134: wrote $wpfbogp_description = "<YOUR_TEXT>";

    I used: get_the_title($post->ID) to get the post title.
    get_field("<FIELD_NAME>", $post->ID ) to get custom field value ( advanced custom fields plugin )

    Conclusion: if it is page, then it uses site description, if it is single post, then it uses custom description...

  3. Fox505
    Posted 3 years ago #

    Odd, I am having the same issue. I will try your fix.

  4. OldGrumpyDE
    Posted 3 years ago #

    That problem stems from the regex used to locate the SEO description. I fixed it by changing the regex in function wpfbogp_callback() to actually work ;)

    $description = preg_match( '#<meta name="description" content="(.*)" />#', $content, $description_matches );


    $content = preg_replace( '#<meta property="og:description" content="(.*)"/>#', '<meta property="og:description" content="' . $description_matches[1] . '"/>', $content );

  5. Chuck Reynolds
    Plugin Author

    Posted 3 years ago #

    The new Beta addresses the filtering issues some sites were having but needs more testing as it fixes a lot and has a lot of additions and changes. Just need some more time to test and should be up in near future.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Facebook Open Graph protocol
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic