Codex / mycred/rank / Filters / mycred_rank_list


  1. Description
  2. Used By
  3. Parameters
  4. Example


This filter allows you to filter the row template for the mycred_list_ranks shortcode. If you find yourself using the same row template over and over again, this filter could adjust it for you automatically.

Requires myCRED 1.1 and Ranks Add-on to be enabled.

Used By


  • template (string)
    Either the default shortcode template or the custom template.
  • atts (array)
    The shortcode attributes.
  • mycred (object)
    The myCRED Settings Object.


If the shortcode attribute ‘wrap’ is set to ‘ul’, replace the given template with our own custom template.

add_filter( 'mycred_rank_list', 'customize_shortcode_template', 10, 3 );
function customize_shortcode_template( $template, $atts, $mycred )
	if ( $atts['wrap'] == 'ul' ) {
		return '<li>%rank_logo%<h1>%rank%</h1></li>';
	return $template;

Last edited June 26, 2016