Share Buttons - Customizing with the "data-*" attribute

Follow

Shareaholic Share Buttons can be customized using data- attributes.

You may customize the content that is shared when people (Title, Link, Image & Summary) by defining "data attributes" within the button code.

To do this, add the following within the div tag embedded in the Share Button code you added to your page:

data-title

data-title='This is my Page Title'

data-link

data-link='https://www.TheURLtoShare.com/page.html'

data-image

data-image='https://www.TheURLtoShare.com/image.jpg'

data-summary

data-summary='Place any notes here.'

data-description

data-description='This is the page description'

Example

<div class='shareaholic-canvas'
     data-app='share_buttons'
     data-app-id="xxxxx"
     data-title='Tiffany T T1 Ring in Rose Gold with Diamonds, 2.5 mm | Tiffany & Co.'
     data-link='https://www.tiffany.com/jewelry/rings/tiffany-t-t1-narrow-diamond-ring-GRP11292/'
     data-image='https://media.tiffany.com/is/image/Tiffany/EcomItemL2/tiffany-tt1-ring-67795253_1010336_ED_M.jpg'
     data-description='Pavé diamonds illuminate one side of this ring, adding a striking radiance to the design. A reinvention of a Tiffany icon, Tiffany T1 designs represent individual strength and perpetual power, worn outwardly to express what lies within.'
     data-summary='A little hint that this caught my eye!'></div>

For Tumblr:

For Tumblr, you can use data-title and data-link along with the dynamic variable keys.

<div class='shareaholic-canvas'
         data-app='share_buttons'
         data-app-id="xxxxx"
         data-title='{title}'
         data-link='{permalink}'></div>

Please, see Tumblr's documentation on theme variables for more information.

For WordPress:

For WordPress, you can use data-link along with the function that retrieves the permalink path. 

<div class='shareaholic-canvas'
         data-app='share_buttons'
         data-app-id="xxxxx"
         data-link='http://www.your-domain-here.com<?php the_permalink(); ?>'></div>

Reference: http://codex.wordpress.org/Function_Reference/the_permalink

For a more complete Shareaholic experience on the WordPress platform, we have a plugin available that does all of the work for you, but still provides full customization capability.