mycred_total_points
Description
This shortcode allows you to show the total amount of points currently in circulation or the total amount of points awarded or deducted from your users for a specific event.
Available since version 1.6.6
Shortcode Attributes
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
type |
string | No | mycred_default | The point type to sum up. Should not be used if you only have one point type installed. |
ref |
string | No | - | Used only if you want to return the total amount of points awarded / deducted for a specific instance. Can either be a single reference or a comma separated list of references. DO NOT use if you want to show total points in circulation. |
ref_id |
int | No | - | Option to filter reference total by reference id. |
user_id |
string or int | No | current | By default, the current users total is shown. You can however change this to a specific user by providing the users ID or set it to be empty to ignore users all together. |
formatted |
int | No | 1 | Option to return the results formatted with prefix / suffix (1) or return it unformatted (0). |
CSS Styling
This shortcode does not return any stylable elements.
Examples
Example 1: Show the total number of points in circulation.
[mycred_total_points user_id=""]
Example 2: Total number of points given out for approved comments for the current user.
[mycred_total_points ref="approved_comment"]