I am trying to select the most recently added tags from wordpress and display them in alpha order as links to that tag page.
I've got everything except putting them in alpha order. This code displays the 5 most recently added tags in a nice list as links. But they're in order of the term_id.
Do I have to put them into an array and re-sort them by name? If so any help on how to do that would be appreciated.
<?php
$tags = get_tags('number=5&orderby&order=DESC');
if ($tags) {
foreach ($tags as $tag) {
echo '<br><a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a> </p> ';
}
}
?>