1. Tutorials
  2. Creating an Achievement Type

Creating an Achievement Type

Let’s to see a real world example of an achievement type creating and configuring a Badge achievement type and awarding badges to our users for logging and commenting on a specific page.

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

1 – Creating the Badge Achievement Type

Access to your WordPress admin area, normally located in your_site_url/wp-admin.Navigate to GamiPress -> Achievement 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 achievement type.

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

If everything went well, an Achievements menu with the Badges sub menu should appear before the GamiPress menu.

2 – Creating Badges

Unlike points types, achievement types has a completely different workflow. When you create a points type, you can start defining ways to award different amounts of a points types.

Achievement types are a more complex system, but to simplify it you just keep in mind one thing: Achievement type is the definition of the type itself, and the achievements are the real award.

For our Badge (achievement type) we need to start setting up new badges (achievements) to award to our user. So let’s to create our first badge with the next set up:

As you can see, an achievement can also give points when user earns it.

For more information about setup achievements, see the Achievement Types documentation page.

3 – Adding steps to our badge

An achievement has different ways to be earned: by completing steps, by a minimum number of points, by reaching a specific rank or admin-awarded only.

If you setup an achievement to be earned by completing steps then the unique way an user could earn this achievement is performing the actions configured on the achievement Steps. Steps are located on the achievement edit screen (after the “Achievment Data” box).

Clicking on the Add New Step button you can add as many steps as you want.

Let’s to configure one step to force to the user to log in to the website at least one time:

4 – Announcing our Badges and how to earn them

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

When an user performs any of the actions configured on badges steps, the step will appear strikethrough:

As you can notice on the screenshot, if the user has completed all the steps, the achievement will look different.
Note: Also you can show just an achievement using the [gamipress_achievement] shortcode or adding a link to the achievement itself like you can do with a WordPress post/page.

Was this article helpful to you? No 2 Yes 5

How can we help?