Support Home > Social > Sharing

Sharing

This guide will show you how to add sharing buttons to your blog posts to give your readers the ability to easily share your content with Twitter, Facebook, Google+*, LinkedIn, and a host of other services to help spread your message across the web.

Sharing gives readers the tools to post your content to their networks from the bottom of each post and/or page.

Activation

To activate the Sharing buttons:

  1. Go to  Jetpack → Settings → Sharing in your site’s dashboard.
  2. Under Sharing buttons, activate the Add sharing buttons to your posts option.

Once the module is active you can add sharing buttons to your site in four short steps:

  1. Navigate to Settings → Sharing in your site’s dashboard.
  2. Under Sharing Buttons, drag and drop the services you want to use into the Enabled Services area.
  3. Choose your preferred button style and where you would like the buttons to appear.
  4. Save!

To add new services, drag the button into the Enabled Services area at any time. You can configure services to appear as icons, text, or both.

Some services have an additional option allowing you to display “official” buttons that show the number of times the post has been shared. Just choose your display option and drag the services you would like to display to the Enabled Services box.

The following services are currently supported:

  • Twitter
  • Facebook
  • Google+*
  • Pinterest
  • Tumblr
  • LinkedIn
  • Pocket
  • Skype
  • Telegram
  • WhatsApp
  • Reddit
  • Email*
  • Print

*Please note that Email sharing is only available if you are using the Akismet spam-filtering plugin to prevent spam abuse or if you explicitly enable it by adding the following to your functions.php file or a functionality plugin:

add_filter( 'sharing_services_email', '__return_true' );

Troubleshooting

The buttons don’t show the number of shares/likes

Share counts are only displayed on the “official buttons”. Please make sure you have selected official buttons from the Button Style dropdown.

The Sharing buttons are not displaying

Check your Sharing settings at Settings → Sharing and make sure you have enabled the sharing buttons on the post types you want to display them on:

The share counts have been reset to zero

The totals shown for each official sharing button come from the services themselves: Facebook, Twitter etc. To calculate the total count, those services use the exact URL of the post when it was originally shared.

If your site’s url changes in any way (for example, changing from http to https, or changing the permalink structure), since the exact URL of the posts has now changed, the counts will have been reset to zero.

And since the count data lies with each service and not on WordPress.com or with Jetpack, there’s no way for us to merge or update those totals on our end.

I don’t see a Sharing section in my WordPress.com dashboard

When Sharing is activated, you should find a Sharing Buttons section in your WordPress.com dashboard, under Tools → Marketing. If you don’t see it, please follow this guide to make sure the Sharing module is not disabled.

Why can’t I share to Google+?

  • Google+ is now no longer a sharing button option. If you had not added a Google+ button to your site before, you won’t see the option to add one to your site anymore. Under Settings > Sharing, you will not see any Google+ option.
  • If you had added a Google+ button to your site in the past, you will see a new button instead, when you are logged in to your admin account. That button will invite you to remove that deprecated service from your site. Your readers, however, won’t see anything.

If you’ve still got questions, please feel free to contact us!

Customization

How do I create my own custom sharing buttons?

  1. Navigate to Settings → Sharing in your dashboard.
  2. Click the Add a new service link in the Available Services section.
  1. Enter a “Service name” to use for the sharing service. It will appear in the link to the service and in the blog sharing stats.
  2. Enter the “Sharing URL.” This is the URL address to the sharing service. You can use the variables,%post_title% %post_url% (short URL), %post_full_url% and %post_excerpt% in the URL, i.e. http://www.google.com/buzz/post?url=%post_url%
  3. Enter the “Icon URL.” This is the URL address to the icon image you wish to use to display with this service, i.e. https://www.someserver.com/images/buzz.png. Note that this image should be available online at the link that you enter here.
  4. Click the “Create Share Button” button.
  5. The new service will appear in the Available Services section. You can now add it to the Enabled Services section to use on your site.

As you customize the sharing services, you can see how they are ordered in the Live Preview section.

How do I add a Captcha to the Email sharing button?

The Email button is great, and you can make it even better by adding a Captcha to the submission form:

To add the Captcha to your site, follow these steps:

  1. Register for an account on this site. Upon registration, you will receive a Public and a Private key.
  2. Open your site’s wp-config.php file in your favorite text editor. Add the following constants with both reCaptcha keys right before /* That's all, stop editing! Happy blogging. */:
    define( 'RECAPTCHA_PUBLIC_KEY', 'XXXXXXX' );
    define( 'RECAPTCHA_PRIVATE_KEY', 'XXXXXXX' );
    
  3. Save the wp-config.php file and refresh your site.

Voila! Your email sharing buttons are now protected against spam.

How can I move where the sharing icons are displayed?

By default, the sharing icons will display right at the bottom of your post’s content. You may want to move it elsewhere in your post, such as right before the content.

To do this, in your functions.php file, add the following:

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

Then find the file for the location where you’d like the sharing icons to appear. Insert the following code in the area you want the Sharing or Likes buttons to appear:

if ( function_exists( 'sharing_display' ) ) {
    sharing_display( '', true );
}

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

Please note that this is provided as a courtesy and we do not provide support for implementing or editing custom code.

How can I hide the sharing buttons on mobile?

Insert this code in your functions.php file:

// Check if we are on mobile
function jetpack_developer_is_mobile() {

    // Are Jetpack Mobile functions available?
    if ( ! function_exists( 'jetpack_is_mobile' ) ) {
        return false;
    }

    // Is Mobile theme showing?
    if ( isset( $_COOKIE['akm_mobile'] ) && $_COOKIE['akm_mobile'] == 'false' ) {
        return false;
    }

    return jetpack_is_mobile();
}

// Let's remove the sharing buttons when on mobile
function jetpack_developer_maybe_add_filter() {

    // On mobile?
    if ( jetpack_developer_is_mobile() ) {
        add_filter( 'sharing_show', '__return_false' );
    }
}
add_action( 'wp_head', 'jetpack_developer_maybe_add_filter' );

How do I use my own resources instead of Jetpack’s default sharing CSS and JS files?

The sharing module includes an “advanced” option, allowing you to use your own Javascript and CSS files instead of the files added by Jetpack by default.

To get started, go to Settings → Sharing in your dashboard, and check the Advanced checkbox at the bottom of the page.

Then, you can add your own libraries by adding the following code in a functionality plugin or in your theme’s functions.php file:

function tweakjp_add_sharing_js() {
    wp_enqueue_script( 'sharing-js', WP_SHARING_PLUGIN_URL . 'sharing.js', array( ), 4 );
    $sharing_js_options = array(
	    'lang'   => get_base_recaptcha_lang_code(),
	    'counts' => apply_filters( 'jetpack_sharing_counts', true )
    );
    wp_localize_script( 'sharing-js', 'sharing_js_options', $sharing_js_options );
}
add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_js' );

function tweakjp_add_sharing_css() {
    wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL. 'sharing.css', false, JETPACK__VERSION );
}
add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_css' );

How do I add “via @username” to the tweets sent via the Twitter button?

There are 2 options to add your Twitter account to the end of each tweet:

  • You can fill in the “Twitter Site Tag” option in Settings → Sharing.
  • If you use the Publicize module and connected a Twitter account, this account will be used in the Twitter sharing button.

Privacy Information

This feature is de-activated by default. It can be activated at any time by toggling the Add sharing buttons to your posts setting in the Sharing buttons section from Jetpack — Settings — Sharing in your dashboard.

Data Used
Site Owners / Users 

 

 

If you add your Twitter username to the Sharing settings, it will be published with the tweet sharing your content. The post title and permalink will also be shared with any of the services. Moreover, if you have Akismet enabled on your site, and a visitor attempts to share a post via email, the site’s home page URL and the post’s permalink will be sent in the API call to Akismet in order to check for spam.Additionally, for activity tracking (detailed below): IP address, WordPress.com user ID, WordPress.com username, WordPress.com-connected site ID and URL, Jetpack version, user agent, visiting URL, referring URL, timestamp of event, browser language, country code.

Site Visitors 

 

 

When official sharing buttons are active on the site, each button loads content directly from its service in order to display the button as well as information and tools for the sharing party. As a result, each service can in turn collect information about the sharing party. When a non-official Facebook or a Pinterest sharing button is active on the site, information such as the sharing party’s IP address as well as the page URL will be available for each service, so sharing counts can be displayed next to the button.

When sharing content via email (this option is only available if Akismet is active on the site), the following information is used: sharing party’s name and email address (if the user is logged in, this information will be pulled directly from their account), IP address (for spam checking), user agent (for spam checking), and email body/content. This content will be sent to Akismet (also owned by Automattic) so that a spam check can be performed. Additionally, if reCAPTCHA (by Google) is enabled by the site owner, the sharing party’s IP address will be shared with that service. You can find Google’s privacy policy here.

Activity Tracked
Site Owners / Users 

 

 

We track when, and by which user, the feature is activated and deactivated. We track when, and which, configuration settings are modified (and by which user).

Site Visitors 

 

 

Email shares will be sent to Akismet (also owned by Automattic) and logged there. See above for the specific data sent to Akismet.

Data Synced (Read More)
Site Owners / Users 

 

 

We sync options that identify whether or not the feature is activated and how its available settings are configured.

Site Visitors 

 

 

None.

  • Table Of Contents

  • Categories

  • Contact Us

    Need more help? Feel free to contact us.