How to add your Affiliate link to MetaSlider

MetaSlider now supports adding your own Affiliate link to MetaSlider to improve your commission. If you bundle MetaSlider in some way then to take advantage of this is easy.

All you need to do is bundle the latest version of MetaSlider with your WordPress installation and include a file inside the mu-plugins folder.

This file should hook into MetaSlider and replaces all MetaSlider.com links with your Affiliate link.

An example of this file would be:


if(!defined("METASLIDER_AFFILIATE_ID")){
//Enter your Affiliate ID here by replacing 1234 with your Affiliate ID
define("METASLIDER_AFFILIATE_ID", "1234");
}

add_filter('metaslider_com_link', 'metaslider_affiliate_link_replace');

function metaslider_affiliate_link_replace($url){
$url = $url . "?afref=".METASLIDER_AFFILIATE_ID;
return $url;
}