With the BadgeOS Activity Codes Add-on, achievements can be awarded to users when they enter a valid code. The add-on allows you to display a code input area for the activity codes, using a widget and a shortcode. Once users enter the Activity Code here, the achievement will be earned. If the code entered is not valid for use, the user is notified appropriately through a message.
In this article, we’ll walk you through the steps you need to follow to install and set up this add-on, in order to allow your users to earn achievements directly by submitting a code on your site.
Table Of Contents
- Install the BadgeOS Activity Codes Add-on.
- Configure the Activity Codes Achievements.
- Display the BadgeOS Activity Code Input Area on your Site
- Configure the Activity Codes Add-on with the BadgeOS Guest Achievements Add-on
- Frequently Asked Questions.
1. Install the BadgeOS Activity Codes Add-on
- Install the BadgeOS plugin & activate it.
- Install the BadgeOS Activity Codes add-on and activate it.
- Install the free Guest Achievements add-on and activate it.
2. Configure the Activity Codes Achievements
- Create a BadgeOS achievement and configure the “Earned By” option with the Activity Code.
- Add the Activity Code you want the user to enter to earn the achievement.
- Add the desired time, in minutes, that the user is given to enter a code on the Activity Code Lockout field.
3. Display the BadgeOS Activity Code Input Area On Your Site
You can display the BadgeOS Activity Code Input Area using a widget by following these steps:
- Navigate to Appearance > Widgets and use the widget named “BadgeOS Activity Code Input.” This input area can also be displayed using a shortcode or a block.
- As soon as the user enters a valid Activity Code, there is a notification that returns an immediate response about if the achievement is earned or the code is invalid.
- The valid entry of the Activity code adds the achievement to the user’s account.
You can also display the Activity Code Input Area by adding a block to a page or post, using the Gutenberg block editor. To do so, please follow these steps:
- Navigate to the desired post/page.
- Click at the “Add Block” icon (+).
- Scroll down to the “BadgeOS Block” or search “BadgeOS.”
- Expand the section.
- Select the “Activity Code Input Area” block.
- Set up the block from the right sidebar.
- Publish/Update.
Finally, you can also display the BadgeOS Activity Code Input Area by adding the following shortcode to any page or post:
[badgeos_activity_code_input input_text=”Enter Activity Code” submit_text=”Submit”]
4. Configure the Activity Codes Add-on with the BadgeOS Guest Achievements Add-on
Using the Guest Achievements add-on you can allow users that don’t have an account on your site or are not logged in to their accounts to redeem their activity code achievements and add them to their accounts by logging in or creating an account. To use both of these add-ons together, please follow these steps:
- Create a BadgeOS achievement and configure the “Earned By” option with the Activity Code.
- Put the desired Activity Code required to earn the achievement.
- Put the desired time in minutes on Activity Code Lockout, if you want to allow a user to enter a single code in the given period of time.
- Navigate to Appearance > Widgets and use the widget named “BadgeOS Guest Achievements” to display the Guest Achievements Widget.
- When a user submits a code on the activity code front-end widget, BadgeOS Guest Achievements’ widget will be visible as the guest has potentially earned an achievement.
- As the user registers or logs in, the achievement is claimed and added to the user’s account.
5. Frequently Asked Questions
I want to rename Activity Codes to “Redeem Codes” and want to change the displayed text from “Submit” to “Redeem”, is there a way to edit it?
Yes, you can edit the Activity Code Input Area from the widget or block configuration menu or using the Activity Code Input Area shortcode’s attributes.
How can a user know if the Activity Code entered is valid or invalid?
The Activity Codes Input Area allows users to see if the code entered is valid or not.