Affiliates – Shortcodes
Note: From release 1.3.1, you can go to Affiliates > Options and press the Generate button which will create the default Affiliate Area.
Information for affiliates
Affiliate link
Embed this shortcode on a page:
[affiliates_url]
This will render a link to your site with the affiliate ID appended.
If you want to link to a certain page, you can use this shortcode:
[affiliates_url]http://www.example.com/somepage[/affiliates_url]
If you want to show how a link would look like, you can use the shortcode within HTML as well, for example:
<a href=”[affiliates_url]”>[affiliates_url]</a>
Remember to use HTML entities for < and >.
Affiliate earnings & performance
Your affiliates will want to know how much they will and have earned and how many referrals they have made.
Use the [affiliates_referrals] shortcode to show how many referrals an affiliate has made and how much the affiliate has earned.
The [affiliates_referrals] shortcode will show the total number of referrals that have been accepted or closed for the affiliate.
To show the number of referrals for an affiliate by status, embed it like this:
Examples:
- Accepted referrals: [affiliates_referrals status=”accepted”]
- Closed referrals: [affiliates_referrals status=”closed”]
- Pending referrals: [affiliates_referrals status=”pending”]
- Rejected referrals: [affiliates_referrals status=”rejected”]
If you add the show=”total” attribute to that shortcode, it will make a list of earnings by currency:
Examples:
Total amount for paid and unpaid referrals: [affiliates_referrals show=”total”]
- Total for unpaid referrals: [affiliates_referrals show=”total” status=”accepted”]
- Total for paid referrals: [affiliates_referrals show=”total” status=”closed”]
- Total for referrals pending approval: [affiliates_referrals show=”total” status=”pending”]
- Total for rejected referrals: [affiliates_referrals show=”total” status=”rejected”]
Content visibility
* Embed the content that you want to show to affiliates like this:
[affiliates_is_affiliate]
This is visible to affiliates who are logged in only.
[/affiliates_is_affiliate]
* For content to show to non-affiliates use this:
[affiliates_is_not_affiliate]
You can see this if you are not logged in as an affiliate.
[/affiliates_is_not_affiliate]
Login and Logout
Use the following shortcode to allow users to log in and remain on the same page after having logged in. This shortcode also accepts an optional redirect_url attribute to redirect the user to a different page after logging in.
[affiliates_login_redirect]
[affiliates_login_redirect redirect_url=”http://www.example.com/where-to-redirect/”]
Use the following shortcode to embed a Log out link on a page:
[affiliates_logout]
Affiliate Registration
Shortcode tag
[affiliates_registration /]
Usage
Lets visitors sign up to your affiliate program in a fully automated process.
Attributes
is_widget
Must be set to true if the shortcode is used in a widget.
default: false
registered_profile_link_text
Profile link text to be displayed for registered users after signing up for the affiliate program.
registered_profile_link_url
Profile Link for registered users after signing up for the affiliate program.
redirect
Whether to redirect after registration.
default: false
redirect_to
Redirection URL.
terms_post_id
ID of the post with affiliate terms and conditions.
Notes
This feature is also available as the Affiliates Registration widget.
Affiliates Pro provides additional shortcodes for affiliate links, banners and stats.

Registration is currently closed..how do i fix this?
You need to allow people to register on your site: Go to Settings > General and tick Membership [x] Anyone can register
Hi where can I find documentation on the extended shortcodes for the pro version?
I’ve just forwarded an outline to you while full doc is prepared. Thanks a lot for your support
Hey Kento,
You can check out my dutch affiliates page on http://bedrukjeeigenkerstbal.nl/affiliates.
Three questions:
1. Can I translate all the fields to a Dutch text?
2. Can I personalize the e-mail my affiliates receive? I would like it to include a thank you message and their personal affiliates code.
3. Will this url not interfere with the plugin?
I just used the shortcode without any options. I will probably add those later.
Hi Max,
1 – Sure, this just needs a translation file to be added. If you know how to handle .po files I’ll forward a template or you can send me the fields’ translations.
2 – Not yet, that might get added to a coming release though. Features get added as contributors help or if general interest is sufficient.
3 – No the URL should not interfere.
Hey the Xmas balls are a nice idea
Hey Kento,
Thanks for the reply.
1. Can you send me the .po files? I have never done it, but I am sure I’ll figure it out and it will be nice to learn.
2. I will make a template for the page where affiliates are send to and send the e-mail from there. Can I access Post or get variables on that page?
3. Thought.
And thank you. We sold 50 already and the dutch december spirit has started today, so I am hoping for a big success.
Thanks Max for contributing with your translations.
Take a look at class-affiliates-registration.php, you should be able to derive what you need from there for the template.
Fingers crossed for Xmas sales