mycred_total_points

Codex / mycred/balance / Shortcodes / 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_TYPE_KEY 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 0 Option to filter reference total by reference id.
user_id string or int No - 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: Default usage (total number of points in circulation).

[mycred_total_points]

Example 2: Total number of points given out for approved comments.

[mycred_total_points ref="approved_comment"]

Last edited June 23, 2016