Template Tags
General Template Tags
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
Navigation:
- Description
- 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:
Navigation:
- Description
- 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:
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
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
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
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.
%logout_url_here%
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.
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
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.
Navigation:
- Description
- 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:
Navigation:
- Description
- 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:
Navigation:
- Description
- 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:
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.
Related Template Tags
Post Related Template Tags
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
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
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
User Related Template Tags
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
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
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
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
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
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
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
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
Comment Related Template Tags
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
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
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