Support » Plugin: Jetpack by WordPress.com » Sharing compatibility with 'Custom Post Widgets' and other Custom Post Types

  • JetPack sharing has an odd incompatibility with Custom Post Widgets’ Content Blocks. I’ve alerted the author to the issues in this thread:

    http://wordpress.org/support/topic/jetpack-sharing-incompatibility?replies=10

    He’s devised a work-around, but it seems like perhaps JetPack may need to be made more compatible with custom post types — at leaf more selective about where it shows the Sharing buttons.

    Here’s my original post and the link to the Custom Post Widgets support thread…

    Custom Post Widgets’ Content Blocks are displaying odd behavior in regards to it’s interaction with the WordPress JetPack plugin’s sharing buttons.

    When embedded in a page, they don’t show their own Sharing buttons, but it prevents the page’s Sharing buttons from showing.

    When as widget in a sidebar, the Sharing buttons show up at the end of the page content, as expected, but there’s also a set that show up at the bottom of the widget itself.

    I’ve managed to hide the ones in the widget just using CSS, but it’s an odd incompatibility that should be corrected, especially where it’s preventing the sharing buttons from showing on pages where they are embedded.

    I think there’s a way of having a post type properly register itself, so that JetPack sees is, and would let you globally exclude it from the Sharing Settings panel.

    Perhaps the JetPack team can look into a solution with the ‘Custom Post Widgets’ author for better compatibility?

    Thanks,
    Michael

    More info:

    http://wordpress.org/support/topic/jetpack-sharing-incompatibility?replies=10

    https://wordpress.org/plugins/jetpack/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Nikoya

    (@nicolas-andre)

    Hi, exactly same problem …

    i’ve try different things but don’t find a working solution 🙁

    Thanks

    Nikoya

    (@nicolas-andre)

    hello,

    If someone is looking for a solution …
    this is what i do actually, it’s not perfect but that works.

    1, Enable share plugin from jetpack

    2, I disable the share filter from jetpack by adding this code in my functions.php

    function jptweak_remove_share() {
    
        remove_filter( 'the_content', 'sharing_display',19 );
        remove_filter( 'the_excerpt', 'sharing_display',19 );
    
    		if ( class_exists( 'Jetpack_Likes' ) ) {
            remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
        }
    }
    add_action( 'loop_start', 'jptweak_remove_share' );

    3, Then i add this code in my theme where i need to display share buton

    if ( function_exists( 'sharing_display' ) ) {
        sharing_display( '', true );
    }
    
    if ( class_exists( 'Jetpack_Likes' ) ) {
        $custom_likes = new Jetpack_Likes;
        echo $custom_likes->post_likes( '' );
    }

    Solution found here : http://jetpack.me/2013/06/10/moving-sharing-icons/

    But it’s not perfect for 2 reasons at least :

    1, now we can’t use settings page to select where button display
    2, The problem stay with all other plugin

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Happiness Engineer

    He’s devised a work-around, but it seems like perhaps JetPack may need to be made more compatible with custom post types — at leaf more selective about where it shows the Sharing buttons.

    As I mentioned in the other thread, I wasn’t able to reproduce this. I created a new Custom post Type, and the sharing buttons did NOT show unless I checked the box on Settings -> Sharing; it was not checked by default.

    Richard, please see my comment in the other thread — with Custom Post Widget, a checkbox for it’s Custom Post Type doesn’t even show up on the Sharing Settings page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sharing compatibility with 'Custom Post Widgets' and other Custom Post Types’ is closed to new replies.