Getting an ordered list of tags – via wp_tag_cloud or not?

one possibility: using the ‘format=array’ and ‘echo=0’ parameters; and building a foreach loop to output each tag:

<ol>
  <?php 
  $wptc = wp_tag_cloud('smallest=12&largest=12&orderby=count&order=DESC&format=array&unit=px&number=5&echo=0'); 
  foreach( $wptc as $wpt ) echo "<li>" . $wpt . "</li>\n"; 
  ?>
</ol>

Leave a Comment