1. Documentation
  2. Tutorials
  3. Creating a Points Type

Creating a Points Type

Let’s to see a real world example of a points type creating and configuring a Credits points type and awarding our users for logging and commenting on a specific page with 100 credits for each action.

Also let’s to see how to announce to the user the existence of this credits, the requirements to earn some of this credits and finally a page with his credits balance.

1 – Creating the Credits Points Type

Access to your WordPress admin area, normally located in your_site_url/wp-admin.Navigate to GamiPress -> Points Types menu (This view is really similar to the WordPress post/pages views).

At the top of this view you can find a button to add a new points type.

Let’s to configure our new points type with the next data:

2 – Creating ways to award Credits

GamiPress has the possibility to automatically award an user with an amount of a points type (credits on this example) when the user performs some actions through the Points Awards. Points awards are located on the points type edit screen (after the “Points Type Data” box).

Clicking on the Add New Points Award button you can add as many points awards as you want.

Let’s to configure two points awards, one to award an user with 100 credits for log in and another one for create a comment on “Sample Page”:

3 – Creating ways to lose Credits

GamiPress has the possibility to automatically deduct an amount of a points type (credits on this example) when the user performs some actions through the Points Deducts. Points deducts are located on the points type edit screen (after the “Points Awards” box).

Clicking on the Add New Points Deduct button you can add as many points deducts as you want.

Let’s to configure a points deduct to deduct 10 credits for deleting a post:

4 – Announcing our Credits and how to earn or lose them

GamiPress has the [gamipress_points_types] shortcode that allows you to show all or a specific points type, so creating a page with [gamipress_points_types type="credits"] will show something like this:

When an user performs any of the actions configured on credits points awards, he will receive the amount of points as well as the points awards will appear strikethrough:

Also GamiPress comes bundled with widgets to show a list of points types on any sidebar.

Note: If you have more points types configured (like Gems or Coins) using [gamipress_points_types type="all"] will show something like this:

5 – Showing to the user his Credits balance

GamiPress has the [gamipress_points] shortcode that allows you to show all or a specific points balance of the current user, so creating a page with [gamipress_points type="credits"] will show something like this:

Also GamiPress comes bundled with widgets to show the user points balance on any sidebar.

Was this article helpful to you? Yes 1 No 1

How can we help?