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
    Categories
    Filter by category
    1. Actions
    2. Classes
    3. Filters
    4. Functions
    5. Hooks
    6. Objects
    7. Shortcodes
    8. Template Tags
    Chapters
    Documentation
    1. Chapter I - Introduction
    2. Chapter II - Getting Started
    3. Chapter III - Add-ons
    4. Chapter IV - Premium Add-ons
    5. Chapter V - For Developers
    6. Chapter VI - Reference Guides
Category: User Related

Codex / User Related

%balance_f%Tag

This template tag returns the current balance of the user, formatted with prefix and/or suffix.

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
%balance%Tag

This template tag returns the current balance of the user, unformatted.

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
%display_name%Tag

Returns the users display name.

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
%user_id%Tag

Returns the users id.

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
%user_name_ec%Tag

Returns the users “user name” URL encoded.

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
%user_name%Tag

Returns the users “user name”.

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
%user_profile_link%Tag

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

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
%user_profile_url%Tag

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

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

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