mycred_affiliate_id

Description

This shortcode is used by the “Points for referrals” hook which allows your users to gain points for referring visitors and/or signups. This shortcode will return the unique referral ID of the user who views the shortcode. If the user is excluded from using myCRED or the particular point type or if the shortcode is viewed by a visitor this shortcode will return an empty string.

Requires the “Points for referrals” hook to be enabled.

Available since version 1.4

Shortcode Attributes

Attribute Type Required Default Description
type string No mycred_default If you are using multiple point types and the hook is enabled for more then one type, you can use this to define which point type this shortcode belongs to.

CSS Styling

This shortcode does not return any stylable elements.

Examples

Example 1: Insert a users referral ID into a sentence.

<p>Referral URL example: http://mywebsite.com/?mref=[mycred_affiliate_id]</p>