mycred_list_ranks
Description
This shortcode allows you to list all ranks with the point requirements and / or the members count for each rank. You can customize how each row is presented by wrapig the shortcode around your template.
Requires the Ranks add-on to to enabled.
Available since version 1.1.1
Shortcode Attributes
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
order |
string | No | DESC | The order of the ranks. Accepts "DESC" for descending order or "ASC" ascending order. |
ctype |
string | No | mycred_default | Option to filter ranks by point type. Should not be used if you only have one point type installed. |
wrap |
string | No | div | The element to wrap around each rank. Can not be empty. |
Available Template Tags
For your row template you can use the General template tags and the following:
%rank%Rank title%rank_logo%Rank Logo%min%Minimum point requirement%max%Maximum point requirement%count%Number of users with this rank
CSS Styling
// Wrapper
div.mycred-rank-list { }
// Default row template
div.mycred-rank-list p { } Examples
Example 1: List ranks using paragraphs.
[mycred_list_ranks wrap=""] <p>%rank_logo% %rank% <span class="req">%min% – %max%</span></p> [/mycred_list_ranks]
Example 2: List ranks using an unorganized list.
[mycred_list_ranks wrap="ul"] <li>%rank_logo% %rank% <span class="req">%min% – %max%</span></li> [/mycred_list_ranks]