WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
Jetpack posts sharing links on non-post/page output (6 posts)

  1. Pixelgadgets
    Member
    Posted 7 months ago #

    A plugin that uses custom posts (when a post type is not a page or a post) has the Jetpack sharing icons added to the bottom of the post's output.

    the widget bridge plugin uses a custom post to store it's content. When the content is rendered you get the facebook, linkedin, etc icons added to the end of the output.

    There is no way to remove this other than turning off Jetpack sharing, since JP only has switches for pages and post and not custom fields.

    http://wordpress.org/plugins/jetpack/

  2. Pixelgadgets
    Member
    Posted 7 months ago #

    The plugin is not 'widget bridge' but 'Widget Builder'

    http://wordpress.org/plugins/widget-builder/

    Sorry about that.

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 7 months ago #

    I'm afraid I'm not familiar enough with the plugin to be able to help. it seems to use a Custom Post Type to build the widgets, but when outputting the widget in the sidebar the post type gets set to "Post". It's consequently not possible to remove the sharing buttons with a code like this one:

    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 );
        }
    }
    
    function jptweak_rm_share_widget_builder() {
    	$builder_post_type = 'tribe_widget_builder';
    
    	if ( $builder_post_type == get_post_type() || is_post_type_archive( $builder_post_type ) ) {
    		add_action( 'loop_start', 'jptweak_remove_share' );
    	}
    }
    add_action( 'init', 'jptweak_rm_share_widget_builder' );

    Could you ask the Modern Tribe developers to take a look at the problem, and let me know what they think of the problem?

    Thanks!

  4. Pixelgadgets
    Member
    Posted 7 months ago #

    Thanks Jeremy for your reply.

    I will forward the info.

  5. Pixelgadgets
    Member
    Posted 7 months ago #

    Would it help if Widget Builder exposed the "No sharing" option within the custom post edit screen help prevent this?

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 7 months ago #

    It could help, yes. Custom Post Types are usually displayed there; I'm not sure how the Widget Builder was built and why it's not displayed there.

Reply

You must log in to post.

About this Plugin

About this Topic