How to Cloak Affiliate Links in WordPress without Plugin

How to Cloak Affiliate Links in WordPress without Plugin

Willing to cloak your affiliate links so that people normally will not recognize it as an advertorial? Or for other purpose you want to hide your external affiliate link address. Here is what you are looking for. In this article you will learn how to cloak affiliate links in WordPress without a plugin.

 

What is Link Cloaking?

Basically a Link Cloaking is a technique which change the external link URL looks in another way, shortened or encoded. For example we have an affiliate link looks like this on our website:

http://www.affiliate.com/items/id=123&affiliate=123

After link cloaking: http://www.yourdomain.com/link?url=encodedURL

 

Cloak Affiliate Links in WordPress without Plugin

First of all, create a folder called link under WordPress root folder and paste the following code into a new file called index.php under link folder: (Save this code in UTF-8 format)

  • Remove the redundant word “a” in the code snippet at baase64_decode.

Second, insert the following code into functions.php in your theme:

  • Remove the redundant word “a” in the code snippet at baase64_encode.

Finished!

 

</catmee> 文章全部原创、谢绝转载,作者「BianLei」,如果喜欢欢迎分享链接,相关内容参见本站版权声明
如果您觉得本站的存在对您多少有所帮助,可以用手机支付宝扫一扫以下二维码支付任意金额作为支持:支付宝
本站相关:QQ空间 | Facebook
Tagged , . Bookmark the permalink.

东北虽冷、小动物依然温暖人心,二月哈尔滨随手拍
东北虽冷、小动物依然温暖人心,二月哈尔滨随手拍

Kuala Lumpur Street Photography 2015/02/22
Kuala Lumpur Street Photography 2015/02/22

WCS哈尔滨赛区Cosplay随手拍2015春季
WCS哈尔滨赛区Cosplay随手拍2015春季

Harbin Street Photography 2015/03/10
Harbin Street Photography 2015/03/10

Shenzhen Street Photography, 2016 September
Shenzhen Street Photography, 2016 September

Comment Anonymously? No Problem! | 可以匿名评论了我会说?

Fill up Email address to subscribe reply and display your avatar from Gravatar (If any)
填写邮箱即可显示您在Gravatar的头像