mycred_list_ranks

Codex / mycred/rank / Shortcodes / 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: Customize each row to use an unorganized list.

<ul class="my-custom-rank-list">[mycred_list_ranks wrap=""]</ul>
 
<ul>
<li>%rank_logo% %rank%
<div class="req">%min% – %max%</div>
</li>
</ul>
 
[/mycred_list_ranks]

Example 2: Same as example 1 but letting myCRED generate the UL element for us.

[mycred_list_ranks wrap="ul"]
<li>%rank_logo% %rank%<div class="req">%min% – %max%</div></li>
[/mycred_list_ranks]

Last edited June 23, 2016