mycred_leaderboard_position shortcode

Description

This shortcode allows you to show a given user or the current user’s position in a particular leaderboard. Replaces the mycred_my_ranking shortcode

Shortcode Attributes

Attribute

Type

Required

Default

Description

user_id

STRING

No

current

Option to show the position of a particular user in the leaderboard. Accepts “current” for current user or a user ID.

ctype

STRING

No

mycred_default

The point type to base the leaderboard on. Should not be used if you only have one point type installed.

based_on

STRING

No

balance

Option to base the leaderboard on users balance (balance) or a particular reference. For example basing a leaderboard on who got most points for approved comments.

total

INT

No

0

When showing a leaderboard based on balances, you can select to use users total balance (1) instead of their current balance (0).

missing

STRING

No

 

suffix

STRING

No

 

 

timeframe

STRING

No

 

If the leaderboard is based on references, you can set a timeframe for the leaderboard. Accepts the keywords “today” for todays leaderboard, “this-week” for this weeks leaderboard, “this-month” for this months leaderboard or a well formatted date to start from.

Examples

				
					[mycred_leaderboard_position]