Modifying the share URL | WordPress.org

[ad_1]

The Affiliates developer has an add-on that seems to integrate with AddToAny, but it requires their paid version.

The AddToAny plugin’s Additional JavaScript box doesn’t parse shortcodes right now, but you could look into exposing the Affiliates ID in an HTML meta tag on your pages like:

<meta name="affiliates-id" content="1">

Then have your AddToAny share event grab the ID like:

a2a_config.callbacks.push({
  share: function (shareData) {
    var affiliatesId = document.querySelector('meta[name="affiliates-id"]').getAttribute('content');
    if (affiliatesId) {
      return {
        url: shareData.url + '?affliates=" + affiliatesId,
      };
    }
  }
});

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer