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
General Template Tags
%admin_email%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

This template tag returns your websites’ email address. This is the email address used on the General Settings page in WordPress. Added in version 1.1

 

Usage

Email Notices

This email was sent from %blog_name% - %site_info%

Output

This email was sent from myCRED - a free WordPress points management plugin

 

Hooks

This template tag can be used in any hook that accepts General template tags.

 

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%badge_image%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Add-ons

Description

This template tag returns the badge image that the user has achieved.

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%badge_title%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Add-ons

Description

This template tag returns the badge title that the user has awarded.

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%blog_info%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

This template tag returns your websites’ tagline. Returns an empty string if tagline is not used. Added in version 1.1

 

Usage

Email Notices

This email was sent from %blog_name% - %site_info%

Output

This email was sent from myCRED - a free WordPress points management plugin

 

Hooks

This template tag can be used in any hook that accepts General template tags.

 

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%blog_name%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

This template tag returns your websites’ name. Added in version 1.1

 

Usage

Email Notices

This email was sent from %blog_name%

Output

This email was sent from myCRED

 

Hooks

This template tag can be used in any hook that accepts General template tags.

 

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%blog_url%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

This template tag returns your websites’ URL. Added in version 1.1

 

Usage

Email Notices

This email was sent from <a href="%blog_url%">%blog_name%</a>

Output

This email was sent from <a href="http://mycred.me">myCRED</a>

 

Hooks

This template tag can be used in any hook that accepts General template tags.

 

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%login_url_here%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the login url with a redirection to the current page, to be used in HTML elements.

 

Usage

<a href="%login_url_here%" title="Click to Login">Login & Return</a>

 

Hooks

This template tag can be used in all hooks.

 

Add-ons

This template tag can be used with all add-ons.

Back To Top

%login_url%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the login url without any redirection, to be used in HTML elements.

 

Usage

<a href="%login_url%" title="Click to Login">Login</a>

 

Hooks

This template tag can be used in all hooks.

 

Add-ons

This template tag can be used with all add-ons.

Back To Top

%logout_url_here%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the logout url with redirection to the current page, to be used in HTML elements.

 

Usage

<a href="%logout_url_here%" title="Click to Logout">Logout & Return</a>

 

Hooks

This template tag can be used in all hooks.

 

Add-ons

This template tag can be used with all add-ons.

Back To Top

%logout_url%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the logout url without any redirection, to be used in HTML elements.

 

Usage

<a href="%logout_url%" title="Click to Logout">Logout</a>

 

Hooks

This template tag can be used in all hooks.

 

Add-ons

This template tag can be used with all add-ons.

Back To Top

%num_members%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

This template tag returns the total number of registered members on your website. Added in version 1.1

 

Usage

Email Notices

This email was sent from %blog_name% - %site_info%

Output

This email was sent from myCRED - a free WordPress points management plugin

 

Hooks

This template tag can be used in any hook that accepts General template tags.

 

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%plural%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Examples
  4. Hooks
  5. Add-ons

Description

Template tag returning the name of your points in plural form. For example: Points, Tokens, Credits. Adding an underscore at the beginning will return the name in lowercase.

 

Usage

%plural% or %_plural%

 

Examples

Example 1: Buy %_plural% now!

Buy tokens now!

Example 2: 10 %plural% for sending an invite.

10 Tokens for sending an invite.

 

Hooks

This template tag can be used in all hooks.

 

Add-ons

This template tag can be used with all add-ons.

Back To Top

%price%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Add-ons

Description

This template tag returns the amount that the user has determined to settings.

Add-ons

This template tag can be used with the following add-on:

  • Sell Content

Back To Top

%rank_image%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Add-ons

Description

This template tag returns the rank image that the user has achieved.

Add-ons

This template tag can be used with the following add-ons:

  • Email Notification

Back To Top

%rank_title%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Add-ons

Description

This template tag returns the rank title that the user has awarded.

Add-ons

This template tag can be used with the following add-ons:

  • Email Notification

Back To Top

%singular%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Examples
  4. Hooks
  5. Add-ons

Description

Template tag returning the name of your points in singular form. For example: Point, Token, Credit etc. Adding an underscore at the beginning will return the name in lowercase.

 

Usage

%singular% or %_singular%

 

Examples

Example 1: Earn yourself a %_singular%!

Earn yourself a token!

Example 2: %singular% for logging in.

Token for logging in.

 

Hooks

This template tag can be used in all hooks.

 

Add-ons

This template tag can be used with all add-ons.

Back To Top

%user_name%
Category: General Category: Template Tags

Navigation:

  1. Description
  2. Hook

Description

This template tag returns the amount that the user has determined to settings.

Hook

This template tag can be used with the referral hook:

  • Referral

Back To Top

Amount Related Template Tags

%cred_f%
Category: Amount Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the points amount formated with prefix and/or surffix.

Usage

Log Template

%cred_f% %_plural% penalty.

Output

5 Points penalty.

Hooks

This template tag can be used in all hooks.

Shortcodes

This template tag can be used in the mycred_leaderboard shortcode.

Back To Top

%cred%
Category: Amount Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the points amount without any prefix or surffix.

 

Usage

Log Template

%cred% %_plural% penalty.

Output

5 Points penalty.

 

Hooks

This template tag can be used in all hooks.

Shortcodes

This template tag can be used in the mycred_leaderboard shortcode.

Back To Top

Post Related Template Tags

%link_with_title%
Category: Post Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post title wrapped in the posts permalink.

 

Usage

Log Template

Points for new post: %link_with_title%

Output

Points for new post: <a href="http://address.com/a-new-post/">A new post</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Publishing Content
  • Contact Form 7 Form Submissions
  • bbPress 2.0
  • BuddyPress: Groups

Back To Top

%post_title%
Category: Post Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post title in plain text format.

 

Usage

Log Template

Points for new post: %post_title%

Output

Points for new post: A new post

 

Hooks

This template tag can be used in the following hooks:

  • Points for Publishing Content
  • Contact Form 7 Form Submissions
  • bbPress 2.0
  • BuddyPress: Groups

Back To Top

%post_type%
Category: Post Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post type’s singular name.

 

Usage

Log Template

Points for new %post_type%

Output

Points for new Page

 

Hooks

This template tag can be used in the following hooks:

  • Points for Publishing Content
  • Contact Form 7 Form Submissions
  • bbPress 2.0
  • BuddyPress: Groups

Back To Top

%post_url%
Category: Post Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post url to be used in an anchor element.

 

Usage

Log Template

Points for new post: <a href="%post_url%">%post_title%</a>

Output

Points for new post: <a href="http://address.com/a-new-post/">A new post</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Publishing Content
  • Contact Form 7 Form Submissions
  • bbPress 2.0
  • BuddyPress: Groups

Back To Top

User Related Template Tags

%balance_f%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

This template tag returns the current balance of the user, formatted with prefix and/or suffix. To return the balance unformated consider using the %balance% template tag. Added in version 1.1

 

Usage

Email Notices

Your current points balance is %balance_f%.

Output

Your current points balance is 1,200.00 $pt.

 

Hooks

This template tag can be used in any hook that accepts User related template tags.

 

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%balance%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

This template tag returns the current balance of the user, unformatted. To return the balance formated consider using the %balance_f% template tag. Added in version 1.1

 

Usage

Email Notices

Your current points balance is %balance%.

Output

Your current points balance is 1200.

 

Hooks

This template tag can be used in any hook that accepts User related template tags.

 

Add-ons

This template tag can be used with the following add-ons:

  • Email Notices

Back To Top

%display_name%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the users display name.

 

Usage

Log Template

Points for becoming friends with %display_name%

Output

Points for becoming friends with John Doe

 

Hooks

This template tag can be used in the following hooks:

  • Points for Registration
  • BuddyPress: Members

 

Add-ons

This template tag can be used with the following add-ons:

  • Transfer

Back To Top

%user_id%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the users id.

 

Usage

Log Template

Points for new friend: %display_name% ID: %user_id%

Output

Points for new friend: John Doe ID: 2

 

Hooks

This template tag can be used in the following hooks:

  • Points for Registration
  • BuddyPress: Members

 

Add-ons

This template tag can be used with the following add-ons:

  • Transfer

Back To Top

%user_name_ec%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the users “user name” URL encoded. If you want to return the username in plain format you can use the %user_name% template tag instead.

 

Usage

Log Template

Points for becoming friends with <a href="http://address.com/members/%user_name_ec%/" title="View Profile">%display_name%</a>

Output

Points for becoming friends with <a href="http://address.com/members/john%20doe/" title="View Profile">John Doe</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Registration
  • BuddyPress: Members

 

Add-ons

This template tag can be used with the following add-ons:

  • Transfer

Back To Top

%user_name%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the users “user name”. If you want to return the username URL encoded you can use the %user_name_ec% template tag instead.

 

Usage

Log Template

Points for becoming friends with %user_name%

Output

Points for becoming friends with john doe

 

Hooks

This template tag can be used in the following hooks:

  • Points for Registration
  • BuddyPress: Members

 

Add-ons

This template tag can be used with the following add-ons:

  • Transfer

Back To Top

%user_profile_link%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the link to the users profile page with their display name as title.

 

Usage

Log Template

Points for becoming friends with %user_profile_link%

Output

Points for becoming friends with <a href="http://address.com/members/john%20doe/">John Doe</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Registration
  • BuddyPress: Members

 

Add-ons

This template tag can be used with the following add-ons:

  • Transfer

Back To Top

%user_profile_url%
Category: Template Tags Category: User Related

Navigation:

  1. Description
  2. Usage
  3. Hooks
  4. Add-ons

Description

Returns the users profile url to be used in an anchor element.

 

Usage

Log Template

Points for becoming friends with <a href="%user_profile_url%" title="View Profile">%display_name%</a>

Output

Points for becoming friends with <a href="http://address.com/members/john%20doe/" title="View Profile">John Doe</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Registration
  • BuddyPress: Members

 

Add-ons

This template tag can be used with the following add-ons:

  • Transfer

Back To Top

Comment Related Template Tags

%c_link_with_title%
Category: Comment Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post title wrapped in the posts permalink for where the comment was made.

 

Usage

Log Template

Points for new comment on: %c_link_with_title%

Output

Points for new comment on: <a href="http://address.com/a-new-post/">A new post</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Comments

Back To Top

%c_post_id%
Category: Comment Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post id where the comment was made.

 

Usage

Log Template

Points for new comment on: <a href="http://address.com/?post=%c_post_id%">%c_post_title%</a>

Output

Points for new comment on: <a href="http://address.com/?post=123">A New Post</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Comments

Back To Top

%c_post_title%
Category: Comment Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post title where the comment was made in plain text format.

 

Usage

Log Template

Points for new comment on: %c_post_title%

Output

Points for new comment on: A new post

 

Hooks

This template tag can be used in the following hooks:

  • Points for Comments

Back To Top

%c_post_url%
Category: Comment Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the post url where the comment was made, to be used in an anchor element.

 

Usage

Log Template

Points for new comment on: <a href="%post_url%/#%comment_id%">view comment</a>

Output

Points for new comment on: <a href="http://address.com/a-new-post/#123">view comment</a>

 

Hooks

This template tag can be used in the following hooks:

  • Points for Comments

Back To Top

%comment_id%
Category: Comment Related Category: Template Tags

Navigation:

  1. Description
  2. Usage
  3. Hooks

Description

Returns the comment id.

 

Usage

Log Template

Points for new comment #%comment_id%

Output

Points for new comment #123

 

Hooks

This template tag can be used in the following hooks:

  • Points for Comments

Back To Top

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