Primary

[affiliates_affiliate_link]

This shortcode allows you to embed links and banners, please refer to:

Affiliate Links

This feature is available in Affiliates Pro and Affiliates Enterprise. You can easily add any number of affiliate banners to any page on your site.

Affiliate (text) links are used by your affiliates to link to your site without using a specific banner image. You can use the [affiliates_affiliate_link] shortcode on any page to show affiliates how their link looks like and what code they have to embed on their site to link to yours.

Embed an affiliate link using this shortcode on a page:
[affiliates_affiliate_link /]
Whenever an affiliate is logged in and visits the page where this is embedded, they will see their actual affiliate link to your site.

Affiliates need to know how to reproduce this link on their site, emails, etc. To provide the code they need, the render shortcode attribute is used:
[affiliates_affiliate_link render="code" /]

So, the first shortcode shows an affiliate how the link will appear when embedded on a page using the code. The second shortcode provides affiliates the code they have to embed on their page to make the link appear.

Example: creating a page showing a basic affiliate link
Create a new page on your blog, then copy and paste the following: “Your affiliate link: [affiliates_affiliate_link /]"

Embed this code in your emails or tweets: [affiliates_affiliate_link render="code" /]
Save the changes and visit the page logged in as an affiliate. You will see the affiliate link and the code used to embed the affiliate link.

Example: linking to a specific page
Place the following on a post or page to create an affiliate link to the page at http://www.example.com/products/ – of course the URL must point to a page on your site.

Your affiliate link:
[affiliates_affiliate_link url="http://www.example.com/products/" /]
Embed this code in your emails or tweets:
[affiliates_affiliate_link url="http://www.example.com/products/" render="code" /]

Shortcode attributes.

Basic attributes

url : (optional) Use this attribute to link to a specific page on your site. By default this attribute is empty, thus the affiliate link will point to your site’s root.
render : (optional) Either code or html (default). If set to code, the HTML that must be used to produce the affiliate link is shown. If set to html, the affiliate link is rendered.

content : (optional) For text links, this will determine the link text that will appear linked to your site. This option will override any content enclosed by the shortcode.

attachment_id : (optional) Use this to render a banner based on an attachment uploaded to your site’s Media.

type : (optional) One of append, auto (default) or parameter. Use append when other URL parameters are present and the affiliate ID should be appended as a URL parameter. Use parameter to append the affiliate ID as a URL parameter.

Link attributes

Link attributes allow to specify determined attributes of the HTML <a> tag that is used to construct the affiliate link. Supported attributes are listed below, prefixed by a_ any can be passed to the shortcode. Please refer to HTML/Elements/a or The A element for an explanation of supported attributes.

a_class
a_id
a_style
a_title
a_name
a_rel
a_rev
a_target
a_type

Image attributes

Image attributes allow to specify determined attributes of the HTML <img> tag that is used to construct the affiliate banner. Supported attributes are listed below, prefixed by img_ these can be passed to the shortcode. Please refer to Including an image: the IMG element for an explanation of supported attributes.

Please note that these attributes are only applied when an image is specified through the img_src attribute. Some may not be applied when the attachment_id is provided.

img_alt
img_class
img_height
img_id
img_name
img_src
img_title
img_width

Examples

Note that in each case you will usually embed the same shortcode twice, once without the render attribute to show how the link or banner looks like
[affiliates_affiliate_link … /]
and once again to show the code that affiliates have to embed on their site:
[affiliates_affiliate_link … render="code" /]

Make sure you don’t actually use the ellipsis … in the shortcode, as it just represents possible attributes.

Simple:
[affiliates_affiliate_link]Affiliate Link[/affiliates_affiliate_link]

Given text as content :
[affiliates_affiliate_link content="Really, click me, I'm a great link!"]Awesome link[/affiliates_affiliate_link]

Given text as content with link attributes :
[affiliates_affiliate_link content="Click me" a_class="clickme" a_id="clickme1" a_style="font-size:2em;" a_target="_blank" a_title="Click here"]Awesome link[/affiliates_affiliate_link]

Link content inside shortcode with link attributes:
[affiliates_affiliate_link a_class="clickit" a_id="link1" a_style="font-style:italics;" a_target="_blank" a_title="Click this"]Click here[/affiliates_affiliate_link]

In most cases it will be sufficient to use the most basic version of the shortcodes for affiliate links and banners based on the attachment_id of an image you have uploaded to your site’s Media. If you are not familiar with basic HTML element attributes, do not just copy the above examples to your page. In that case, just use the affiliate area generation option and add simple versions of affiliate links and banners.