December 23rd in Wordpress by pbu .

Affiliate Hide – Free wordpress plugin to redirect affiliate links!

A very simple and useful Wordpress plugin to hide/cloak and redirect affiliate links based on custom fields. All you have to do is create a custom field `URL` in your wordpress post and specify the affiliate link there. This plugin can come in handy for gallery wordpress blogs where you are listing products or themes or services. Checkout this site and see how this plugin is practically used.

This plugin masks the affiliate links like shown below.

http://yourblog.com/jump/33 ——-> http://example.com
http://yourblog.com/go/33/ ——-> http://example.com
http://yourblog/download/33 ——> http://example.com
http://yourblog.com/link/33 ——-> http://example.com
http://yourblog.com/r/33/ ——–> http://example.com

If you see the above example, the number 243 is my wordpress post id. The plugin automatically queries the custom field value `url` in the wordpress post 243 and redirects to destination url. This plugin supports with or without trailing slashes.

Download (5kb)

Installation

1. Download the plugin, upload to wordpress/wp-content/plugins/ folder and activate the plugin.

2. Go to your blog post, create custom field `redirect_url`(can be any name) and enter the destination url in the value box.

3: Go to Admin > Settings > Affiliate Hide, enter the options you want

(i) URL trigger

Enter what trigger you want. eg. link, jump, go

If you enter `go` then your destination url will be hidden and show like http://yourblog.com/go/273. Once you click this the plugin will redirect to destination site

http://yourblog.com/go/273 ----------> http://example.com

assuming that your blog post has http://example.com setup under custom field with name ‘redirect_url`

(ii) Custom Field Name

Enter `redirect_url` assuming the redirect_url is the custom field you have created in your blog post, holding the destination url.

(iii) Link Text

Indicate what anchor link text you want. eg. Visit website, Download, Visit Author etc.

Another trick is, if you want to show a graphicimage instead of text, place img tag like

<img src="http://example.com/images/download.gif">

. No other html codes allowed except img tag.

For more information visit the authors site.

(iv) Trailing slash

If you want trailing slash in the url, select `yes` else `no`

yes -------> http://yourblog.com/go/273/ (with trailing slash)
no --------> http://yourblog.com/go/273 (no trailing slash)

default is no.

Save settings!

4. Finally open your template files (single.php, archive.php or index.php)

and place the code ……

<?php
if(function_exists('affiliate_hide')) {
affiliate_hide_print();
}
?>

Just make sure it is in the loop.

Frequently Asked Questions

1. How do i customize the URL for my needs?

I can give you so many URL ideas to hide your affiliate link. For example you can use `jump` `link` or anything in the URL. All you need to do is just edit the plugin php file for modifications.

You can use it with or without trailing slash. Enable or disable it in admin settings.

http://domain.com/jump/33 ——-> http://example.com
http://domain.com/go/33/ ——-> http://example.com
http://domain.com/link/33 ——-> http://example.com
http://domain.com/r/33/ ——–> http://example.com

2. How do i change the custom field name?
Just go to wp admin > affiliate hide > custom field and update it.

3. How to specify custom keywords for affiliate links?

At present this plugin does not have this feature. If you want to specify specific keywords i would recommend GoCodes Plugin where you have to manually enter specific URLs for defined set of keywords.

Similar Posts:

Share and Enjoy:
  • del.icio.us
  • digg
  • StumbleUpon
  • Technorati
  • DZone
  • Facebook
  • FriendFeed
  • Reddit
  • RSS
  • Twitter

6 Comments

  • G.N.R.S.U
    December 31, 2009
  • Josh
    March 12, 2010
    • pbu
      March 12, 2010
      • Josh
        March 12, 2010
    • Josh
      March 12, 2010
  • pbu
    March 12, 2010

Leave A Comment.