1. Documentation
  2. Shortcodes
  3. [gamipress_points]

[gamipress_points]

Output an user points balance.

Attributes:

  • type – Single, or comma-separated list of, points type(s) to display. Accepts: all or any slug of any points type. Default: all
  • thumbnail – Display the points type featured image. Accepts: yes, no Default: yes
  • label – Display the points type label (singular or plural name, based on the amount of points). Accepts: yes, no Default: yes
  • current_user – Show points balance of current logged in user. Accepts: yes, no Default: no
  • user_id – Show only points earned by a specific user. Leave blank to show the site points (points sum of all users).
  • inline – Display the points inline (as text). Accepts: yes, no Default: no
  • columns – Columns to divide each points balance. Accepts: 1, 2, 3, 4, 5, 6 Default: 1
  • layout – Layout to show the points. Accepts: left, top, right, bottom or none Default: left
  • wpms – Show points from all network sites.

Example:
[gamipress_points type="all" columns="3" thumbnail="yes" label="yes" user_id="1" layout="left"]

Showing site points

[gamipress_points] includes the ability to show the sum of all user’s points balances in your site (per type). The unique thing you need is don’t provide any user to the shortcode.

By default, [gamipress_points] shortcode sets the current_user attribute to no so if you don’t provide current_user and user_id attributes then the points shown will be based on the sum of all user points balances.

Example about show a sum of all users balances of all types (the sum will be separated by type):
[gamipress_points type="all"]

Example about show a sum of all users “credits” balances:
[gamipress_points type="credits"]

Was this article helpful to you? Yes 1 No

How can we help?