Description
This shortcode will show a users total points balance by adding up two or more point types into one.
Shortcode Attributes
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
user_id |
string or int | No | - | Option show the total balance of a particular user instead of the user viewing the shortcode. |
types |
string | No | mycred_default | Comma separated list of point type keys to add up into one balance. |
raw |
int | No | 0 | Option show the amount formatted (0) or unformatted (1). |
total |
int | No | 0 | Option show the users current balance (0) or their total balance (1). |
CSS Styling
This shortcode does not return any stylable elements.
Examples
Example 1: Add up the default point type and a custom point type that we called “mycustomtype“
[mycred_total_balance types="mycred_default,mycustomtype"]
Example 2: Add up the total balances of the default point type and a custom point type that we called “mycustomtype“
[mycred_total_balance types="mycred_default,mycustomtype" total=1]