Skip to content

Instantly share code, notes, and snippets.

@MaruscaGabriel
Created March 10, 2015 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaruscaGabriel/addf990aa241bf10499b to your computer and use it in GitHub Desktop.
Save MaruscaGabriel/addf990aa241bf10499b to your computer and use it in GitHub Desktop.
Customize tag cloud widget
/* Customize tag cloud widget*/
function my_tag_text_callback( $count ) {
return sprintf( _n('%s Articles', '%s Articles', $count), number_format_i18n( $count ) );
}
add_filter('widget_tag_cloud_args','set_number_tags');
function set_number_tags($args) {
$args = array('smallest' => 11, 'largest' => 11, 'number' => 30, 'orderby' => 'count','order' => 'DESC', 'topic_count_text_callback' => 'my_tag_text_callback' );
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment