WordPress.org

Forums

[Plugin: Jetpack] Can't disable opengraph (13 posts)

  1. Robert Accettura
    Member
    Posted 2 years ago #

    For those of us with our own implementation of opengraph, or simply prefer not to have them, installing jetpack seems to turn on opengraph tags automatically with no way of disabling. Would be nice if it had the option of disabling this feature.

  2. dukeo
    Member
    Posted 2 years ago #

    To remove the opengraph tags that Jetpack is adding, paste the following line of code to the functions.php file of your theme:

    remove_action( 'wp_head', 'jetpack_og_tags' );

  3. jatinsapra
    Member
    Posted 2 years ago #

    @dukeo. Thanks a lot. I use Yoast SEO & Jetpack update was causing problem :)

  4. mikeotgaar
    Member
    Posted 2 years ago #

    Another thanks @dukeo
    Crazy not to have a disable function - now I have to add this to every WP site I run. I use Social Graph Protocol and add the og meta manually

  5. Robert Accettura
    Member
    Posted 2 years ago #

    Thanks @dukeo

  6. bobbingwide
    Member
    Posted 2 years ago #

    thanks for this. I had an similar problem.
    jetpack_og_tags() was calling
    $tags['og:description'] = strip_tags( get_the_excerpt() );

    and the chain of events meant that some of my logic handling 'the_content' was invoked multiple times... but I was only responding to 'the_content' the first time it was invoked.

    So I have a temporary workaround but feel I should look for another solution to my 'the_content' processing.

  7. Devin Walker
    Member
    Posted 2 years ago #

    +1 for a disable option. That's bonkers it's not included.

  8. palPalani
    Member
    Posted 2 years ago #

    add_filter( 'jetpack_enable_opengraph', '__return_false', 99 );

    The "jetpack_enable_opengraph" filter controls whether the Open Graph functionality loads.

    For me "jetpack_enable_opengraph" is not working, I am using the "jetpack_enable_open_graph" filter and it works well.

    add_filter('jetpack_enable_open_graph', '__return_false', 99);

  9. idleberg
    Member
    Posted 2 years ago #

    @palPalani thanks, i used remove_action before (without troubles), but as of 2.0.3 your method is the only one working for me

  10. KenRocker
    Member
    Posted 2 years ago #

    Easy disable jetpack opengraph with little plugin:
    https://github.com/sgthemes/Remove-Jetpack-Open-Graph-Tags

  11. Scruffy Dog
    Member
    Posted 2 years ago #

    I am trying to solve the extra opengraph tags inserted by JetPack
    Using this plugin I get an error message on activation of the plugin:

    The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Is this normal?

    A test with the Facebook debugger shows this plugin makes the problem worse
    from multiple og:url error
    to
    Can't Download: Could not retrieve data from URL.

    I must be doing something wrong
    using WP 3.5.1
    http://www.pub340.ca

  12. smolkadesign
    Member
    Posted 2 years ago #

    Thanks @dukeo - this worked!

  13. ep0ch
    Member
    Posted 2 years ago #

    Has anyone noticed that GTS Translation will not work properly with Yoast SEO? Google Webmaster Tools is showing hundreds of duplicate meta descriptions across all the /language/*/ pages...this is probably bad for SEO and I absolutely cannot find a solution for this anywhere...if only there were some magical way to force GTS to translate the output of the Yoast SEO plugin...if anyone could help I would appreciate it very much so.

Topic Closed

This topic has been closed to new replies.

About this Topic