Disable OpenGraph functionality when provided by another plugin (I.e. Yoast SEO) (2 posts)

  1. aendrew
    Posted 2 years ago #

    The current implementation seems to be causing all kinds of problems with comment moderation via the ogp.me namespaces. In the event the user already uses a plugin for OpenGraph metadata, they should have the ability to disable this plugin from adding extra metadata and causing errors.

    To that end: maybe add an option to the main config screen that disables OpenGraph metadata?


  2. aendrew
    Posted 2 years ago #

    In lieu of an actual option within the plugin to prevent it from duplicating OpenGraph metadata supplied by another plugin, add the following to your theme's functions.php file:

    * OpenGraph stuff is now handled by Yoast or whatever.
    * This removes Facebook's broken use of its own technology.
    add_action('wp_head', 'remove_fb_og_stuff', 0);
    function remove_fb_og_stuff() {
    remove_action( 'wp_head', 'Facebook_Open_Graph_Protocol::add_og_protocol' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic