Created
March 10, 2015 20:00
-
-
Save MaruscaGabriel/addf990aa241bf10499b to your computer and use it in GitHub Desktop.
Customize tag cloud widget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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