WordPress tagcloud arguments
-
I am making some modifications to my tagcloud widget on my wordpress site. My goal is to generate a regular list of tags that have currently been used (most popular on top).
I have added some entries to my functions page as follows:
function custom_tag_cloud_widget($args) {
$args[‘number’] = 0; //adding a 0 will display all tags
$args[‘largest’] = 16; //largest tag
$args[‘smallest’] = 16; //smallest tag
$args[‘unit’] = ‘px’; //tag font unit
$args[‘format’] = ‘list’; //ul with a class of wp-tag-cloud
$args[‘orderby’] = ‘count’; //change list order by popularity
return $args;
}
add_filter( ‘widget_tag_cloud_args’, ‘custom_tag_cloud_widget’ );Everything is working except the orderby argument
For whatever reason it acts like it’s not there (the widget still loads my links in alphabetical order instead of by number of times tag has been used)
Can someone help me as to why this isn’t working?
Thanks
- The topic ‘WordPress tagcloud arguments’ is closed to new replies.