amy-d
6/5/2015 - 9:40 PM

PHP: WP - Tags

PHP: WP - Tags

<h5>Tags</h5>
<ul class="footer__list">
	<?php $tags = get_tags( array(
		'orderby' => 'count', 
		'order' => 'DESC',
		'number' => 10			// MAXIMUM NUMBER OF TERMS TO RETURN
	) );
		
	foreach ( (array) $tags as $tag ) {
		echo '<li><a href="' . get_tag_link ($tag->term_id) . '" rel="tag">' . $tag->name . '</a></li>';
	} ?>
</ul>