Use a custom URL with ShareThis social share plugin

You can append a st_url property to each of your span tags which will control the URL that is shared.

<span class='st_facebook_hcount' st_url='http://my.custom.com/url' displayText='Facebook'></span>

Source: https://support.sharethis.com/hc/en-us/articles/218441477-How-to-Customize-which-URL-Text-and-IMG-to-Share


Just use st_url attribute like this:

<span class="st_sharethis" st_url="http://www.yoursite.com/innerpage.php" st_title="inner page title" displayText="ShareThis"></span>

You can just add an extra atrribute like

<div class="sharethis-inline-share-buttons"  data-url="<!--YOUR_URL_GOES_HERE-->"></div>

Tags:

Javascript

Php