A free points management plugin for WordPress.
myCRED Logo
myCRED Logo
  • Membership New
  • Chapters
    • Chapter I – Introduction
    • Chapter II – Getting Started
    • Chapter III – Add-ons
    • Chapter IV – Premium Add-ons
    • Chapter V – For Developers
    • Chapter VI – Reference Guides
  • Categories
    • Actions
    • Classes
    • Constants
    • Filters
    • Functions
    • Objects
    • Shortcodes
    • Hooks
    • Template Tags
  • Packages
    • mycred/api
    • mycred/badge
    • mycred/balance
    • mycred/banking
    • mycred/content
    • mycred/core
    • mycred/coupon
    • mycred/email
    • mycred/game
    • mycred/log
    • mycred/notice
    • mycred/payment
    • mycred/purchase
    • mycred/rank
    • mycred/transfer
  • Store
  • Download
Chapter I
Introduction
  1. The Plugin
  2. Points
  3. The Log
  4. Administration
  5. Automatic Points
  6. Multisites
    • Master Template
    • Central Logging
  7. Add-ons
  8. Supported Plugins
  9. BuddyPress
  10. Usage Examples
  11. Limitations
  12. myCred 2.2
    • Features
    • Point Type
    • Point Type Image
    • Add-ons
    • Built-In Add-ons
    • Free Add-ons
    • Premium Add-ons
    • Badges
    • Alignment and Layout – Badges
    • Social Share
    • Shortcodes
    • Template
    • Treasures
    • Support
    • Suggestions
  13. myCred 2.4
    • New Features
    • myCred Gutenberg Support
    • Assign Badges/Ranks Through Coupons
    • Import/Export tool
Chapter II
Getting Started
  1. Installation
  2. Point Type Settings
  3. Multiple Point Types
  4. Adjusting Balances
  5. Bulk Assign
    • Getting Started
  6. Setup Hooks
  7. Import Data
    • Importing Balances
    • Importing Log Entries
    • Import CubePoints
  8. Export Data
  9. Widgets
  10. Shortcodes
  11. Optimization
  12. Uninstall
Chapter III
Add-ons
  1. Badges
    • Achievement Types
    • Creating Badges
    • Manual Badges
    • Open Badge
    • Displaying Badges
    • Developer Resources
  2. buyCRED
    • Selling Points
    • Add-on Setup
    • Payment Gateways
    • myCred Square
    • The Checkout Page
    • Pending Payments
    • Developer Resources
  3. Coupons
    • Creating Coupons
    • Redeeming Coupons
    • Coupon Management
    • Developer Resources
  4. Email Notifications
    • Add-on Setup
    • Creating Emails
    • Unsubscribe
    • Developer Resources
  5. Gateway
    • WooCommerce
    • WP E-Commerce
    • Event Espresso
    • Events Manager
    • Developer Resources
  6. Notifications
    • Troubleshooting
    • Developer Resources
  7. Ranks
    • Introduction
    • Add-on Setup
    • Create New Rank
    • Displaying Ranks
    • Developer Resources
  8. Sell Content
    • Add-on Setup
    • Manual Mode
    • Available Shortcodes
    • Troubleshooting
    • Developer Resources
  9. Statistics
    • Available Shortcodes
    • Settings
    • For Developers
  10. Transfers
    • Add-on Setup
    • Available Shortcodes
    • Transfer Messages
    • Transfer Types
    • Developer Resources
  11. Freebies
    • myCred BuddyBoss Integration
    • myCred Learndash Points Importer
    • myCred Badgr
    • myCred WP Simple Pay
    • myCred Tutor LMS
    • myCred Credly
    • BP Group Leaderboards
    • myCred for Events Manager Pro
    • myCred Learndash
    • myCred H5P
    • myCred Github Rewards
    • myCred GiveWP
    • myCred Paid Membership Pro
    • myCred Memberpress
    • myCred Gamipress Importer
    • myCred Zoom
    • Amelia Add-on
    • myCred Anspress Integration
  12. cashCred
    • Getting Started
    • ShortCode
    • CashCred Form
    • Frontend Functionality
    • Admin Panel
    • cashCred Email Events
    • Fees
    • Gutenberg Block Support
  13. Central Deposit
    • Schedule Deposit
    • Email Triggers
Chapter IV
Premium Add-ons
  1. The myCred Store
  2. buyCRED Gateways
    • Stripe
    • Payza
    • Wepay
    • PayFast
    • 2checkout
    • Coinbase
    • ComproPago
    • Paymentwall
    • Robokassa
    • CoinPayments
  3. Third-party Bridges
    • myCred Beaver Builder
    • myCred WCVendors
    • LifterLMS Plugin Integration with myCred
    • myCred Gutenberg
    • myCred Dokan
    • myCred Elementor
    • myCred for WPBakery Page Builder
    • myCred for UserPro
    • myCred for Users Ultra
    • myCred Zapier Addon
  4. Games
    • myCred PacMan
    • Fortune Wheel Addon
  5. Enhancements
    • myCred Submission
    • Level Cred Add-on
    • myCred WooCommerce Plus
    • myCred Expiration Add on
    • myCred REST API
    • myCred Reset Point Add on
    • myCred Todo List
    • myCred Nominations
    • Progress Bar
    • myCred Social Proof
    • Notifications Plus
    • Social Share Add on
    • Transfer Plus
    • Twilio Transfers
    • Video Add-on
    • Video Add-on for JW Player
    • BuddyPress Charges
    • myCred Points Cap
    • Partial Payments – WooCommerce
    • myCred Progress map
    • myCred Email Digest
    • myCred Birthday Plus
    • myCred Daily Login Rewards
    • myCred Coupons Plus
    • myCred Anniversary Pro
    • myCred Email Plus
    • myCred Time Based Reward
  6. Store Gateways
    • Jigoshop
    • Easy Digital Downloads
    • WPMUDEV Fundraising
  7. cashCred Payment Gateways
    • cashcred PayPal
    • CashCred Paystack
    • cashcred Stripe
Chapter V
For Developers
  1. Introduction
  2. White Labeling
  3. Flowcharts
  4. Playing with Balances
  5. myCred Objects
  6. Log API
  7. Hook API
  8. Module API
  9. Gateway API
  10. Remote API
    • Version 1.0
    • Version 2.0
  11. Front-end Encryption
Chapter VI
Reference Guides
  1. Log References
  2. Shortcodes
  3. Template Tags
  4. Globals
  5. Constants
  6. Actions
  7. Filters
  8. Objects
  9. Functions
  10. Classes
Creating Badges

In order for us to create a badge, we first need to know, what the requirement is for the badge. What myCRED related event or events need to occur for the badge to be awarded.

This is done by nominating the references the add-on should be looking for. As of version 1.7, you can nominate multiple references as a requirement for a badge. This also means that you can create a badge for any myCRED related instance as long as the event is logged under a specific reference.

Once we know what event or events to look for, we need to decide how many times the event has to occur for the badge to be awarded, alternatively how many points much have gained from the event. This is useful when the point amount a user gained / lost is more important than how many times the event has occurred, e.g. points spent in the store.

The Badge Editor

You can find the badge editor in your wp-admin area. Once the add-on is enabled, you will find a Badges submenu under your points menu. You can click on a badge title to edit the badge or click on “Add New” button on the top of the page.

You can click on the “Level x” label and give each level a unique name. This label is then used as a title for the badge the user has earned. Label naming is optional.

The editor consists of 4 sections. First, we have the “Badge Name” which is mandatory. Even if you only plan on showing badge images, each badge must have a name. If no name is provided, WordPress will automatically assign a numeric title e.g. 100.

Next you have the “Badge Setup” metabox. This metabox controls the requirements for the badge and is the most important one of all. Here you define the base requirements for the badge, any levels you might want along with the option to reward users for gaining the badge.

On the right side, you have the “Publish” metabox, which controls your badge, just like Posts and Pages. You can also take badge related actions by connecting or disconnecting badges.

Finally you have the “Default Badge Image” metabox. Here you have the option to set an image that are shown to users if they have not yet earned the badge. It’s optional.

Badge Levels

Introduced in 1.7, badge levels allows your users to earn a badge multiple times. All levels you add will have the same required references but you get to change the values required for each level. As an example, lets say we have a badge for approved comments. To get the badge we might set the requirement that a user must have gained points for approved comments once. But as time goes on, if the user gains points 100 times, they reach level 2 and at 500 approved comments they reach level 3 etc.

Levels can be used for badges that are automatically awarded or on manual badges.

Badge Images

The badge add-on will show by default badge images in full size. This means that if you upload an image that is 100 x 100 pixels, that is the size of the badge images that will be rendered to your users.

You can always adjust the badge sizes via CSS styling. Look at the documentation for the shortcode or function you select to use to render badges to see available CSS options.

As of version 1.7, you can also use the new MYCRED_BADGE_WIDTH and MYCRED_BADGE_HEIGHT constants. Using these will enforce badges to always be rendered in a specific size.

Badge Rewards

As of version 1.7, you can reward your users for earning a badge or a badge level (if used). Please note that you can not create badges for getting badge rewards! If you do not wish to payout a reward, make sure the reward amount is set to zero.

This reward is paid out when the badge is automatically awarded. This means that rewards will not be paid out for manual badges.

Step by step guide
  1. Give the badge a name.
  2. In the “Badge Setup” metabox, select the point type you want the badge to be tied to (if you have more than one type).
  3. Select the reference tied to the badge.
  4. Select if the requirement is based on Total (number of times a user gained points) or Sum (total amount of points gained / lost) and enter the required amount / value.
  5. If your badge has more than one requirement, click on the “+” button to add a new row. You can add as many as you require. Once you have added in all requirements, make sure your comparison is set to either AND (default) or OR. Selecting AND will require all references you set to be met in order to earn the badge while with OR, the user needs to meet one of the requirements you set.
  6. If you want to reward the user for earning the badge, enter a log entry template and the amount of points you want to give. Note that the “log template” field can not be empty!
  7. If your badge requires more than one level, click on the “Add Level” button to add a new level. Repeat for all levels.
  8. Click “Save Draft”.
  9. Once saved, select the image for each badge level by clicking on the “Set Image” button. You will need to select the image from your Media Library or upload it.
  10. If you want to show a “default” image, select the image by clicking on the “Set Image” button in the “Default Badge Image” metabox.
  11. Since this is an automatic badge, make sure the “This badge is manually awarded” checkbox IS NOT checked!
  12. Click Publish.

Quick Edit

On the badges page, we have introduced a “Quick Edit” hyperlink which enables you to modify the information of any particular badge by using the quick edit option.

About myCRED

myCRED is a free, open-source and developer friendly points management tool for WordPress powered websites.

Download Rate Plugin

Documentation

  • Add-ons
  • Core Shortcodes
  • F.A.Q.
  • Tutorials
  • Third Party Plugins
  • Code Snippets

Support

  • Product Licenses
  • Customization
  • Support Forums
  • Plugin Changelog
  • Contact

Copyright 2013 - 2022 byWPExperts; All rights reserved. myCRED is licensed under GPL 2.0

Terms & Conditions • Use of Cookies • Store Policy • Community Rules

Suggest Codex Example

You can submit suggestions for codex examples that you have available as a public gist. If you are a member on the mycred.me website, you can earn Tokens for each submission. To claim these Tokens, make sure you provide your mycred.me username.

Please make sure the example you submit is relevant and if you include documentation, it's provided in English.

logo
  • Membership New
  • Chapters
    • Chapter I – Introduction
    • Chapter II – Getting Started
    • Chapter III – Add-ons
    • Chapter IV – Premium Add-ons
    • Chapter V – For Developers
    • Chapter VI – Reference Guides
  • Categories
    • Actions
    • Classes
    • Constants
    • Filters
    • Functions
    • Objects
    • Shortcodes
    • Hooks
    • Template Tags
  • Packages
    • mycred/api
    • mycred/badge
    • mycred/balance
    • mycred/banking
    • mycred/content
    • mycred/core
    • mycred/coupon
    • mycred/email
    • mycred/game
    • mycred/log
    • mycred/notice
    • mycred/payment
    • mycred/purchase
    • mycred/rank
    • mycred/transfer
  • Store
  • Download