WordPress.org

Support

Support » Plugins and Hacks » WP Facebook Open Graph protocol » No meta description with Yoast WordPress SEO plugin

No meta description with Yoast WordPress SEO plugin

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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…

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

    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 );

    and

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

    Plugin Author Chuck Reynolds

    @ryno267

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No meta description with Yoast WordPress SEO plugin’ is closed to new replies.
Skip to toolbar