AddThis Academy

An ever-growing library of resources to help you become a better online marketer.

Setting the URL,Title, & Image to Share

To define the URL, title, and image (only for certain services, i.e. Facebook and Pinterest) to share, you do it in one of four ways. For our newest tools, use the data-url, data-title, and data-media parameters, like this:

<div class="addthis_sharing_toolbox" data-url="THE URL" data-title="THE TITLE" data-media="THE IMAGE"></div>

If the code you’re using has the addthis_toolbox in it, use the addthis:url, addthis:title, and addthis:media parameters, like this:

<div class="addthis_toolbox addthis_default_style " addthis:url="THE URL" addthis:title="THE TITLE" addthis:media="THE IMAGE">

Or you can set it using the addthis_share variable, which will change the URL, title, and image shared for all the AddThis tools on the page:

<script type="text/javascript">
var addthis_share = {
   url: "THE URL",
   title: "THE TITLE",
   media: "THE IMAGE"

In any case, be sure to replace THE URL, THE TITLE, and THE IMAGE with the URL, title, and image of the pages to share.

Instructions for WordPress

WordPress provides a way to grab the existing page URL and title, which is helpful when adding the code to a WordPress template. Here’s some example code that can be used within a WordPress template:

<div class="addthis_sharing_toolbox" data-url="<?php the_permalink(); ?>" data-title="<?php the_title_attribute(); ?>"></div>
Setting the URL,Title, & Image to Share
1 (20%) 1 vote

Was this article helpful to you?