Output Label Cloud
example
<? php $this -> widget ( 'Widget_Metas_Tag_Cloud' , 'sort=mid&ignoreZeroCount=1&desc=0&limit=30' ) -> to ( $tags ) ; ?>
<? php if ( $tags -> have ( ) ) : ?> <ul class="tags-list"> <? php while ( $tags -> next ( ) ) : ?> <li><a href=" <? php $tags -> permalink ( ) ; ?> " rel="tag" class="size- <? php $tags -> split ( five , ten , twenty , thirty ) ; ?> " title=" <? php $tags -> count ( ) ; ?> Topics "> <? php $tags -> name ( ) ; ?> </a></li> <? php endwhile ; ?>
<? php else : ?> <li> <? php _e ( 'No label' ) ; ?> </li> <? php endif ; ?> </ul>
Parameter Description
Sort: sort by mid;
IgnoreZeroCount: ignore the number of articles with 0;
Desc: whether to output in descending order;
Limit: Number of outputs.
Random color tag cloud
<? php $this -> widget ( 'Widget_Metas_Tag_Cloud' , 'ignoreZeroCount=1&limit=30' ) -> to ( $tags ) ; ?> <ul class="tags-list"> <? php while ( $tags -> next ( ) ) : ?> <li><a style="color: rgb( <? php echo ( rand ( zero , two hundred and fifty-five ) ) ; ?> , <? php echo ( rand ( zero , two hundred and fifty-five ) ) ; ?> , <? php echo ( rand ( zero , two hundred and fifty-five ) ) ; ?> )" href=" <? php $tags -> permalink ( ) ; ?> " title=' <? php $tags -> name ( ) ; ?> '> <? php $tags -> name ( ) ; ?> </a></li> <? php endwhile ; ?> </ul>